Swift navigation controller - Hide view - ios

I have a problem with the navigation controller and the view. However, I have created a view with a constraint: "Top Space to: Top Layout Guide : 0". I get this result with the simulator:
How to get the view correctly?
Thank you!
EDIT :
The problem is the top of the view is hidden by the navigation controller. On my screenshot, you can see that the segmented control is cut ! The top of the view is not show, even in the storyboard file.

Use edgesForExtendedLayout property to report which edges of your view controller extend underneath navigation bars or other system-provided views.
self.edgesForExtendedLayout = []

Select your view controller from stoaryboard,then unselect the
Adjust Scrollview Insets

Related

Extra space at the bottom of the view controller?

I am using a storyboard with a custom tab bar controller.
When view controllers are added through the storyboard references, with a container(embedded) view, it creates an extra space at the bottom of the view controller, ie just above the tab bar.
The dimension of the space seems to be the same as that of the tab bar height. Is there any solution for this issue?
Check the following in storyboard :
Extend Edges
1. Under Opaque Bars
2. Under Bottom Bars

Remove the gray bar at the bottom of view controller - iOS

The image shows the View controller and the bar I want to remove. And also the structure of the view controller:
Someone told me how to remove the grey bar present at the bottom of the view controller as shown in the image. Unable to select and delete the bar. When I try to add the tab bar in that place, it goes behind the grey bar and becomes invisible.
What do your simulated metrics look like?
Can you get rid of the bar by changing the bottom setting?
Couple of things - if you are using autolayout, just make a constraint to the bottom of the container, with 0 value for the constraint. That will take it to the bottom. Second thing I would add is a zero size table view footer to the tableview.
This is a toolbar that comes with the UINavigationController that the View Controller is embedded in. Assuming you have a Navigation Controller on the storyboard connected to the view controller, select it and in the attributes inspector deselect "Shows Toolbar". If you want to do this in code you can get and set isToolbarHidden on a UINavigationController instance.

iOS UIPageViewController child view under Bottom Bar

I had an UIPageViewController embedded in a NavigationController embedded an TabBarController.
I supposed every child view of the UIPageViewController fits the size within the UITabBarViewController.
The first child view looks fine:
Switch to the next (vertically), it's view suddenly resizes and the view length expands over the bottom bar:
Actually it's not under the bottom bar but clipped to that size (which means if you pull up the view you still cannot see the whole but the cut text).
I did unchecked every related view controller's Under Bottom Bar & Adjust Scroll View Inset but nothing works.
Any suggestion would be appreciated.
Try this in table view controller viewDidLoad() method.
self.extendedLayoutIncludesOpaqueBars = NO;
OR
you can set property in Interface Builder:
Uncheck Extend Edges: Under Bottom Bars, Under Opaque Bars.

NavigationBar hides View while runtime but not in Interface Builder

I set up a tableView with the Interface Builder and put a red View above the TableView like this:
But while runtime the red View gets hide by the Navigationbar, so i have to set a constraint with Autolayout like this:
But that can not be correct...what i´m doing wrong?
More Information which my help:
This is because iOS7 allows views to be displayed beneath it. You need to use an offset to push the view down below the navigation bar like you are doing. You could also set the navigation bar to not allow items beneath it by unchecking
under top bars
If you use xibs instead of storyboard add this into your view controller.
self.edgesForExtendedLayout = UIEdgeRectNone;

UIPageViewController not respecting the top layout guide in iOS 7

I am using a page view controller to flip through a series of view controller, each of which is instantiated from a storyboard. I basically used the standard page based application code as a basis and built what I needed on top of it. The view controllers I'm flipping through are UITableViewController subclasses or custom view controller's that contain custom scroll views or what not.
The page view controller is embedded in a navigation controller, but none of the view controllers are respecting the top layout guide, even though the constraints are set to the layout guides in the storyboard in the case of my custom view controllers and I thought that the table view controller would manage this automatically. I mean the view's contents start from (0.0, 0.0) instead of where the user can see it. The only thing that works is actually setting the frames of the view controller's views to begin just under the status bar + the navigation bar, but I want the scroll view's to scroll under the transparent navigation bar.
What am I doing wrong or not doing?
It sounds like you don't want your content view controller's to underlap the navigation and status bars. If that's the case, try setting parent view controller's edgesForExtendedLayout property to UIRectEdgeNone.
// implementation of page view controller's parent view controller
- (void)viewDidLoad
{
[super viewDidLoad];
self.pageViewController = ...
...
self.edgesForExtendedLayout = UIRectEdgeNone; // iOS 7 only
}
For me, setting automaticallyAdjustsScrollViewInsets = NO; on the UIPageViewController fixed the issue. You can change that in the Interface Builder, under Attribute Inspector, uncheck "Adjust Scroll View Insets".
On storyboards:
Uncheck values in parentviewcontollers "Extend Edges" section

Resources