문제

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;
도움이 되었습니까?

해결책

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
}

다른 팁

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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top