ios - Decreasing images in TableViewController when scrolling -
i'm trying display uitableview
list of artists read last.fm api. store artists in array, show table name , picture.
initially photos good, when scroll images small.
this initial appearance:
this appearance after scrolling, problem:
this code create cells:
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"topartistcell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier forindexpath:indexpath]; jscartist *artist = self.artists[indexpath.row]; cell.textlabel.text = [artist name]; [cell.imageview setimagewithurl:[nsurl urlwithstring:[[artist photo] thumbnail]] placeholderimage: [uiimage imagenamed:@"default_photo.jpeg"]]; return cell; }
the default imageview uitableview acts little odd. create custom uitableviewcell subclass , own layout.
Comments
Post a Comment