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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -