I have a custom `UITableView`. What I'm trying to do is add a row when the user selects a button.
Here is my code:
- (IBAction)addRow:(id)sender
{
NSInteger row = [self.rowArray count] - 1;
[self.rowArray insertObject:@"cellIDRowSeven" atIndex:row];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:0];
[self.myTableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
}
Everything works well, besides for the fact, that when a row gets added, the cells get as small as possible.
For example. I have a cell with buttons in it. The button is bigger than it should be. Meaning that if the button has text with the size of 14, the smallest size the button should be is, say, 30. (I made up that number.) And I made the size to 35. So when the row gets added, it makes the buttons size to 30.
Basically, it makes all the cells as compact as possible.
----------
The weird thing is, when I just do
[self.myTableView reloadData]
It works flawlessly, but I don't have that animation.