Question

I'm using storyboards to create a static UITableView with one section that has a header and a footer. Each tableview cell has a UITextField whose inputView is set to a UIPicker and the accessory view is a UIToolbar.

How it should look

This works great except the section footer floats way above the accessory view's toolbar like this in the sim:

How it actually looks

This only occurs in iOS 7 not 6. Any ideas?

Was it helpful?

Solution

Looks like UINavigationController's toolbar was to blame. Luckily for me I accidentally had it enabled. After removing it the problem was fixed. But if you need the bottom toolbar I don't know what the solution is.

OTHER TIPS

I have that same problem. My tableview was inside a View that had tabBar and a NavBar.

After some research, I found out that iOS7+ automatically adds a offset to the tableview when it is in a view with tabbar/navbar.

You can disable that automatically offset both via code or via Interface Builder.

Via Interface Builder, just uncheck the "Under Top Bars" (if you are using navbar) and "Under Bottom Bars" (if you are using tabbar) on the "Extended Edges" submenu on the View that has your tableview.

enter image description here

That should solve your problem.

For other answers on how to do it (and for the original @xudre's answer from whom I learned the solution - please vote his answer up) go to: UITableView is starting with an offset in iOS 7

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top