Question

I'm developing a new application to ios and i'm using UINavigationController. When i'm developing in the Xcode the view is that:

enter image description here

But in the simulator (iOS 7) this is the result:

enter image description here

And when i use iOS 6 in the simulator, this is the result:

enter image description here

This is my code for use UINavigationController:

RootController *controller = [[RootController alloc]init];
UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:controller];
self.window.rootViewController = navController;
Was it helpful?

Solution

As already pointed out, a straightforward solution is adding this snippet in your viewController's viewDidLoad:

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) { // if iOS 7
    self.edgesForExtendedLayout = UIRectEdgeNone; //layout adjustements
}

OTHER TIPS

You need to set Delta of your view controller. Switch Story board to ios6.1 or later from utility area (1st item). Then select view of your Vc and in size inspector menu in utility area there will be delta section below frame. There will be triangle before every delta. Triangle y to 64 (you should be on ios6.1 or later of your storyboard).

If you need help on Deltas visit : Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?

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