Quote:
Originally Posted by dhanasekar
Hi indiekiduk, thanks. It's helpful for me.
I have created two tab with table view. But i got a problem to add a table item. In the first table view i added simply "Hello Universe" it's working. Then i added NSMutableArray on second table view. but now its not working*
FirstViewController.m - [cell setText:@"Hello Universe"] - it's working fine..
but if add NSArray to AppDelegate it's not working. did anything wrong in this??
TabDemoAppDelegate.m - array = [[NSArray arrayWithObject:@"First",@"Second",@"Third",nil] retain]
|
You haven't provided a lot of information here but going from what you have posted, you need to have the array declared in your table view's data source, and set the cell text from the appropriate location in the array in the method
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath