I am currently trying to put a
Does the cells of the UITableView show on the empty space when you scroll down?
If so, then the problem might be the inset that is added to the UITableView because of the Navigation controller you have in your view. The inset is added to the table view in order for the content to be placed below the navigation bar when no scrolling has occurred. When the table is scrolled, the content scrolls and shows under a transparent navigation bar. This behavior is of course wanted only if the table view starts directly under the navigation bar, which is not the case here.
Another thing to note is that iOS adjusts the content inset only for the first view in the view hierarchy if it is
UIScrollView or it's descendant (e.g.
UICollectionView). If your view hierarchy includes multiple scroll views,
automaticallyAdjustsScrollViewInsets will make adjustments only to the first one.
Here's how to change this behavior:
a) Interface Builder
I'm not sure which XCode version introduced this option (didn't spot it in the release notes), but at least it's available in version 5.1.1.
Edit: To avoid confusion, this was the third option mentioned in the comments
Add this to i.e.
viewDidLoad (credits to Slavco Petkovski's answer and Cris R's comment)
// Objective-C self.automaticallyAdjustsScrollViewInsets = NO; // Swift self.automaticallyAdjustsScrollViewInsets = false
c) This might be relevant for old schoolers
You can either fix this by adding
tableView.contentInset = UIEdgeInsetsZero;
Or if you are using IB and if the navigation bar is not transparent (can't tell from the screenshot)