ios - Getting app freeze and cell becomes empty when prepareForReuse used -


i have tried prepareforreuse app getting stuck while scrolling , cell empty. there wrong i'm doing? subviews added in xib.

guide me proper solutions.

    static nsstring *cellidentifier1 = @"pollcell";      ixpollcustomcell *pollcell = (ixpollcustomcell *)[tableview dequeuereusablecellwithidentifier:cellidentifier1];       if (pollcell == nil) {          pollcell = [[[nsbundle mainbundle] loadnibnamed:@"ixpollcustomcell" owner:self options:nil] objectatindex:0];         pollcell.selectionstyle = uitableviewcellselectionstylenone; 

ixpollcustomcell.m

   - (void)prepareforreuse  { [[self.contentview viewwithtag:2001] removefromsuperview]; //does not crash if view nil. it's okay send messages nil in objc   } 

ixpollcustomcell.h

    @property (weak, nonatomic) iboutlet uiview *multichoiceview;     @property (weak, nonatomic) iboutlet uiview *multioption1view;     @property (weak, nonatomic) iboutlet uilabel *choice1ratelabel;     @property (weak, nonatomic) iboutlet uilabel *color1label;     @property (weak, nonatomic) iboutlet uibutton *option1button; 


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -