I’ve UITableView in UIViewController and I’ve connected through outlet and delegete and datasource are assigned to self.numberOfSectionsInTableView and numberOfRowsInSection are getting called i tried by using NSLogbut cellForRowAtIndexPath is not getting call my code looks like
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@" cellForRowAtIndexPath ");
static NSString *CellIdentifier = @"CurrencyCell";
CurrencyCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[CurrencyCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] ;
}
new *Obj = [appdelegate.array objectAtIndex:indexPath.row];
cell.CurNameLabel.text = Obj.C_Name;
cell.textLabel.text = @"sdfnhsdfndsio;";
NSLog(@"C_Name %@", Obj.C_Name);
return cell;
}
can any one tel wer i’m making mistake Thanks in advance
It seems the
numberOfSectionsInTableViewandnumberOfRowsInSectionreturned are 0.If this is the case then cellForRowAtIndexPath will not get called..From the comment above..it seems that “YourAppDelegate” variable is
nullor yourArray isnull.Try keeping the break point on these delegates ,to check the values returned by them