So, I am posting my code below.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath // I get a warning here Incomplete method implementation //
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...
NSLog (@"Dobby4");
NSInteger row = [indexPath row];
cell.text = [dogArray objectAtIndex:row];
//I get a warning for the line above-- 'text' is deprecated //
return cell;
}
So,
1. I get a warning – incomplete method implementation for that function.
2. I get another warning ‘text’ is deprecated’
3. I tried debugging and tried to print a line “Dobby4” – and it DID NOT print.
I would appreciate some help.
textproperty to set the text (it is as the warning says, deprecated). Use thetextLabelwhich is a subview ofcell. So that line will becell.textLabel.text = [dogArray objectAtIndex:row];.Dobby4, either yournumberOfSectionsInTableView:ortableView:numberOfRowsInSection:is returning 0. If this is not so, then you haven’t connected your datasource properly.