iphone - can't see when using UINib -


been confused on 2 hours, maybe can point me @ right direction...

i have navigation bar tableviewcontroller under it. once first row selected pushing new tableviewcontroller loads custom table cells new , shiny uinib object.

cellforrowatindexpath called , allocated new row, set values of it's 2 uilabel correctly, , return cell.

however - table view empty. if replace custom cell regular table cell, see cell. hell going on here?

some code:

in viewdidload:

self.cellnib = [uinib nibwithnibname:@"detailcell" bundle:nil]; 

in cellforrowatindexpath:

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     static nsstring *cellidentifier = @"detailcell";       detailcell* cell = (detailcell *)[tableview dequeuereusablecellwithidentifier:cellidentifier];      if (cell == nil)      {                 [self.cellnib instantiatewithowner:self options:nil];         cell = tmpcell;         self.tmpcell = nil;     }      cell.fieldname.text = @"field title";     cell.fieldvalue.text = @"field value";      return cell; } 

and custom cell (that has xib file associated well):

@interface detailcell : uitableviewcell {      iboutlet uilabel* fieldname;     iboutlet uilabel* fieldvalue; }  @property (nonatomic, retain) iboutlet uilabel* fieldname; @property (nonatomic, retain) iboutlet uilabel* fieldvalue;  @end 

thanks help.

for following thread, found issue missing cell identifier. value define @ rowatindex needs entered using ib xib file. there identifier field.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -