iphone - TTImageView in TTTableViewCell cell reuse issue -
let me describe issue having using video link here
the issue ttimageview, avatar on left missing image. believe because of cell reuse? how fix this? here code:
- (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring*)identifier { if (self == [super initwithstyle:uitableviewcellstylevalue2 reuseidentifier:identifier]) { _avatar = [[ttimageview alloc] init]; [self.contentview addsubview:_avatar]; _main_title = [[ttstyledtextlabel alloc] init]; [self.contentview addsubview:_main_title]; _detailed = [[uilabel alloc] init]; [self.contentview addsubview:_detailed]; } return self; }
three20 has issues prepareforreuse function in table cells. see https://github.com/facebook/three20/issues/497 example.
what can now, create table item cell subclass of own , have prepareforreuse function.
/////////////////////////////////////////////////////////////////////////////////////////////////// - (void)prepareforreuse { [super prepareforreuse]; [_imageview2 unsetimage]; }
i found it's easier use own ttimageview, , not use existing _imageview ttimageview
Comments
Post a Comment