iOS TablewView not showing data (delegates called)
I'm very new to iOS programming and just tried to setup a tab view,
inckuding a normal one and a table view.
Now there is the problem, that the table view won't get updated. All cells
are always empty.
This is how I declared my ViewController:
@interface SecondViewController : UITableViewController {
According to my logs all delegates are called correctly and even my Logs
in this method are printed to the console.
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView
dequeueReusableCellWithIdentifier:@"CooperCell"];
if (cell == nil) {
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleValue1
reuseIdentifier:@"CooperCell"];
}
NSLog(@"test");
cell.textLabel.text = @"test";
return cell;
}
"test" is logges 3 times as my array has the size 3. So I don't get why it
won't show. And of course I gave the cells the identifier "CooperCell" via
the storyboard. Did I miss something else to link?
No comments:
Post a Comment