I use
func insertRowsAtIndexPaths(indexPaths: [NSIndexPath],
withRowAnimation animation: UITableViewRowAnimation)
method to insert a new Row in a table. But it appears from Top of the UITableView
(by default).
I couldn't find any option to insert rows from the bottom of the table, like on screenshot:
I tried use the UIEdgeInsetsMake
:
self.tableView.contentInset = UIEdgeInsetsMake(tableView.frame.height,0,0,0)
but it broke all design when I scroll the table.
My question is: how to insert a new rows from bottom of the table?
UPD: It should looks like table moves from a keyboard View to NavigationBar when new row is added.
UPD2: Here is what I want: http://recordit.co/JoR7xuvvpG
I did it with the help of
self.tableView.contentInset = UIEdgeInsetsMake(tableView.frame.height,0,0,0)
But contentInset adds a big white field above the rows and when I scroll down it hides added rows. Looks like they is hiding under the keyboardView. I want to prevent it.