ios - Does SDWebImage Framework Automaticcaly use Grand Central Dispatch? -
say if have block of code below;
#import <sdwebimage/uiimageview+webcache.h> ... - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *myidentifier = @"myidentifier"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:myidentifier]; if (cell == nil) { cell = [[[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:myidentifier] autorelease]; } // here use new provided sd_setimagewithurl: method load web image [cell.imageview sd_setimagewithurl:[nsurl urlwithstring:@"http://www.domain.com/path/to/image.jpg"] placeholderimage:[uiimage imagenamed:@"placeholder.png"]]; cell.textlabel.text = @"my text"; return cell; }
do need worry enclosing of in grand central dispatch blocks, or handled us?
Comments
Post a Comment