Initially i have a table view with only one add button.
when user press this button i need to increment the cells count and add the cells as follows
How to write row count and how to add new rows by click on the add button
//Row count
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return **????** ;
}
// Content on cells/rows
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
??????
}
// ### Add New Row.. ###
-(IBAction)myAction:(id)sender
{
???????? ;
}
Thanks in advance…
In your application You have to add values to Array when you performing action in btn.
For example in your tableview you are displaying NSString in cell.textLABEL.text. These strings are in NSMutableArray.
Now when buttonAction is called
in
myAction
Try this logic in your application regarding to your modal.
I hope this logic will be helpful to you.