Search code examples
objective-cios7uitableviewtranslucency

Extend the edges of a UITableView under NavBar and TabBar in UIViewController in iOS 7 to get translucent effect


If I use a UItableViewController it works fine but I need to use a UItableView inside a UIViewController instead. My question is, do i have to manually program it to add extra space at the top and bottom so the first and last cells won't be partially covered and how would I move the refresh indicator down so that its not covered?


Solution

  • Make sure your table view is added as the first subview of your view controller. This will ensure its scroll insets are setup properly.

    Also be sure to set the table view's frame to match the bounds of the view controller's view and be sure to set the autoresizingMask to flexible width and height.