There are one to three UITableViewCells in a UITableViewView. Is there a way to always position the cell(s) at the bottom of screen after rel
This can be done by in swift using below funcation
func updateContentInsetForTableView(tblView: UITableView, animated: Bool) {
let lastRow: NSInteger = self.tableView(tblView, numberOfRowsInSection: 0)
let lastIndex: NSInteger = lastRow > 0 ? lastRow - 1 : 0
let lastIndexPath: NSIndexPath = NSIndexPath(forRow: lastIndex, inSection: 0)
let lastCellFrame: CGRect = tblView.rectForRowAtIndexPath(lastIndexPath)
let topInset: CGFloat = max(CGRectGetHeight(tblView.frame) - lastCellFrame.origin.y - CGRectGetHeight(lastCellFrame), 0)
var contentInset: UIEdgeInsets = tblView.contentInset
contentInset.top = topInset
let option: UIViewAnimationOptions = UIViewAnimationOptions.BeginFromCurrentState
UIView.animateWithDuration(animated ? 0.25 : 0.0, delay: 0.0, options: option, animations: { () -> Void in
tblView.contentInset = contentInset
}) { (_) -> Void in }
}