ios - This view probably hasn't received initWithFrame: or initWithCoder: -


i using tableview , have implemented delegates , data source methods well. not new tableviews , delegates. still getting crash:

terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'requesting window of view (<uiview: 0xc8b7a00; frame = (0 0; 0 0); transform = [0, 0, 0, 0, 0, 0]; alpha = 0; opaque = no; autoresize = w; layer = (null)>) nil layer. view hasn't received initwithframe: or initwithcoder:.' 

i have used same code many other tableviews using 1 don't know wrong , know old or repeated question none of previous solutions worked me. here delegate , data source methods.

-(nsinteger)numberofsectionsintableview:(uitableview *)tableview{     return 2; }  -(nsinteger) tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section{     int numberofrows = 0;     if(section == 0){         numberofrows = [self.lotteryarray count];     }else{         numberofrows = 10;     }     return numberofrows; }   -(uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{     uitableviewcell *celltoreturn = nil;      ledenactiescell *cell = (ledenactiescell *)[self.tableview dequeuereusablecellwithidentifier:@"ledenactiescell"];     if(!cell){         nsstring *nibname = @"ledenactiescellview";         [self.cellowner loadmynibfile:nibname];         cell = (ledenactiescell *)self.cellowner.cell;     }     cell.titlelbl = @"my text cell";     celltoreturn = cell;     return celltoreturn; } 

i have debugged code , never goes cellforrowatindexpath: method.

any suggestions..

you didn't initialise view containing table. use initwithframe: or initialise storyboard.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -