I created a new View controller and into I added “Table View”.
I added outlet into controller code and in viewDidLoad method I trying add a new row.
I have simple data source NSMutableArray with texts (the table is something like “hall of fame”).
How can I insert a rows with texts from array please?
@property (strong, nonatomic) IBOutlet UITableView *fameTable;
@property (weak, nonatomic) NSMutableArray *dataSource;
...
[self.dataSource addObject:@"New Item"];
[self.dataSource addObject:@"New Item 2"];
[self.dataSource addObject:@"New Item 3"];
have a look at insertRowAtIndex method of the table view..
it inserts row without reloading the whole tableview..
And please do a small research before posting such questions.. its a very common question..
still i hope it helps you!! cheers!!
Her’s a small tutorial on basics of table view:
http://www.mobisoftinfotech.com/blog/iphone/introduction-to-table-view/