I\'m developing an application based on the Tab Bar application preset. In one of the tabs I have a table view showing a lot of data, but half the last cell in the table vie
Swift 3:
This is what worked perfectly for me. This code not only stop the last cell showing behind the tab bar, but also pushes up the scroll indicator. Put the code in your viewDidLoad()
:
if let rect = self.navigationController?.tabBarController?.tabBar.frame {
let y = rect.size.height
tableView.contentInset = UIEdgeInsetsMake( 0, 0, y, 0)
tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, y, 0)
}