I have a plain UITableView displayed in a UIView class.
When scrolling to top or bottom it displays white padding.
There are no header\footer views to this table.
This problem occurs only in iOS7.
Here is a screen shot of how it looks
[You can see the white rectangle above digit '1'. I have the same at the bottom]
So far I have tried:
1. tweaking the contentInsets' - it worked, BUT it disabled the ability to scroll the table.
2. UnCheck the "Top Bars", "Bottom Bars" and "Opaque Bars" attribute in IB - Didn't help.
and other stuff that where offered in other posts.
Any idea?
Related
I had weird extra space between the navbar and the top cell of my table view, so I searched around and disabling "Extend Edges > Under Top Bars" got rid of the space, but now my nav bar is grey and boring. "Adjust Scroll View Insets" has no effect either way, btw.
Is there a way to have a normal-looking nav bar without the extra space??
Here's how it looks with the extra space
Here's how it looks with "Extend Edges > Under Top Bars" turned off:
When I tap to search bar in navigation bar title,text of textfield changing position to bottom and placeholder have alignment center. How fix it? Need native vertical center position text and placeholder of search bar.
The problem you are having could be caused by numerous errors.
1)
Scroll View insets in layout is not checked.
2) If constraints are added, they could be affecting the searchTextView insets also. Remove some and check if they are a factor.
3) You have forgotten to adjust the search text offset.
Thx all for answer, I solved this issue. In my case, need uncheck in storyboard Extended Edges - Under Top Bars. And I use custom views in storyboard scenes. I enable opaque navigation bars in storyboard scene and my custom view(nib file) and it work! Thx all for answers,again)
Using storyboard and Swift, I have a view controller which has two elements on it. A UITextField, and a UIView, which I use merely to give a colored border to the UITextField. The UITextField is a child of the UIView. See:
The problem I am having is that despite having set the top bar and bottom bar simulated metrics attributes to Opaque Navigation Bar and Opaque Tab Bar respectively, See:
When the app builds and runs the top of the UIView is always underneath the nav bar. My over all feeling is that this is somehow a constraints issue but I have not been able to find the solution to it. How do I set the constraints so that the UIView is always immediately underneath the nav bar, and the bottom of the view is always just on top of the tab bar?
Select your UIView in storyboard and assign constraints to the top margins and to bottom margins. There is a 'Pin' button you use to do this that looks something like a Tie-Fighter ship in Star Wars, it is located at the bottom right of your storyboard view.
This will set margins to stretch to top and bottom always.
That is what the layout guides are for. Pin the top to the Top Layout Guide and the bottom to the Bottom Layout Guide. The guides will always move to adjust for any top and bottom bars.
So I'm creating my app in storyboard, and i'm using an navigation controller, added an add view, and trying to auto layout stuff there.
But the problem is, i only get blue guided lines when I'm near the corner left and right. So it's basically not looking at my Navigationbar above.. and just ignoring it.
Also, when I'm switching the simulator to a 3.5 inch (I'm making it in 4 inch) the buttons and labels will disappear underneath it. And they are added to Auto layout blue lines?
The blue lines are not AutoLayout, but just lines that guide you when placing your views. Auto Layout only comes in when you start adding constraints. Check out Apple's Autolayout guide:
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html
Control drag from the label to the navigation bar and it will show the below window. The first option is for you to create the constraint from the Navigation Bar bottom.
The Top Layout Guide is a iOS 7 specific feature which marks the bottom line of the navigation bar. The total height of the navigation bar (if present) plus the height of the status bar (if present) equals the toplayoutGuide.length
I have UITabBarController based iPad app with containerView on the first tab. The containerView has standard vertical spacing to bottom layout guide. When I tap on the second tab and then go back to the first tab, my container moves down by 56 pts, the height of the tabBar and is then covered by the tabBar.
I made 3 screenshots to illustrate that. The third screenshot shows hidden tabBar after the jump between tabs. It looks like the bottom layout guide went down to the edge. What is going on here?
I'm not sure about what happened here, but I think that this could help:
Uncheck Under bottom bar in your UIViewController properties
Hope that will help!
Nicolas Bonnet's answer of unchecking "Extend Edges Under Bottom Bar" didn't work for me. In my case the problem seemed to be that I was setting the bottom constraint of my view equal to the Bottom Layout Guide.
So, instead, I aligned the bottom edges of my button and the ViewController's view as shown below.
Select both your view to pin to the bottom and the main view:
Then tap the Align selection menu at the bottom right of Interface Builder and select Bottom Edges: