2014-01-08 28 views
0

我正在開發一個新的應用程序到ios和我使用UINavigationController。當我在Xcode正在開發的觀點是:UINavigationController ios7 - NavTab在視圖前

enter image description here

但在模擬器(iOS的7)這就是結果:

enter image description here

當我使用的iOS 6在模擬器,這是結果:

enter image description here

這是我的代碼F或使用UINavigationController:

RootController *controller = [[RootController alloc]init]; 
UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:controller]; 
self.window.rootViewController = navController; 
+1

可能重複[這裏](HTTP:// stackoverflow.com/questions/19081697/ios-7-navigation-bar-hiding-content/19083545#19083545) – HepaKKes

+0

@HepaKKes,非常感謝,在我的搜索我沒有找到這個職位... –

回答

1

正如所指出的,一個簡單的解決方案是將這個片段在你的viewController的viewDidLoad:

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

您需要設置您的視圖控制器的增量。 從實用區域(第1項)切換到ios6.1或更高版本。 然後選擇您的Vc的視圖,並在實用面積的尺寸檢查器菜單中,框架下方會出現增量部分。 每個三角洲前都會有三角形。 三角形到64(你應該在故事板的ios6.1或更高版本)。

如果您需要三角洲訪問幫助:Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?