Ha ii, i have this code in
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
_lblmainChapterlbl.text=[NSString stringWithFormat:@"%@ %@:%@",delegate.selectedBook,delegate.selectedChapter,localStringValueverseno];
}
which i want to display lie Genesis1.1,but when i tap the cell containing Genesis1.1 on first i get Genesis1.(null),then i tap the second cell which contains Genesis1.2 i got the result of the first Genisis1.1.but there is no problem in delegate.Sewlectedbook and delegate.selectedchapter.the problem is in localStringValueverseno which contains verse number.i got null value on the first tap as i mentioned above.How can i solve it.plese help me.
Thanks in advance.
I guess you have your tableview in a viewcontroller. I also guess
localStringValueversenois a NSString.So in
initWith...of your view controller, add the following line.Initially it might not have any value and so you are getting null.