Using Xcode 5 for iPhone.
I try to display data in a tableview
from an array
in MVC (not local array) - but the data is not displayed in the table and appears empty grid.
I'm using storyboard
(not nib), and custom cell
(not TableViewController).
Can you please Advise what am I missing? Thanks in advance
The code looks like this:
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: (NSInteger)section {
NSLog (@"array count is %i", listRecipes.recipeArray.count);
return [listRecipes.recipeArray count];
}
and also
-(UITableViewCell )tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString cellIdentifier = @"ListCellIdentifier";
MYCustomListCell* listCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
NSString* dataString = listRecipes.recipeArray[indexPath.row];
listCell.listName.text = dataString;
listCell.imageView.image = [UIImage imageNamed:dataString];
return listCell;
}