你們有沒有偶然發現這個問題?導航控制器呈現在視圖上我導航到
基本上在iOS 7中導航控制器在我導航到的子視圖上呈現。
在iOS 6視圖中,導航欄位於導航欄和頁腳之間。在iOS 7中,它看起來像是在導航欄和頁腳下全屏顯示子視圖。因爲結果用戶沒有看到它。
這是我如何定位到子視圖
BRSMyListSubViewController *tagsInfoVC = [[BRSMyListSubViewController alloc] initWithCheckinsList:self.checkinsList
selectedTag:[self tagByIndexPath:indexPath]];
[self.navigationController pushViewController:tagsInfoVC animated:YES];
這是我如何初始化它viewDidLoad
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStyleBordered target:self action:@selector(settings:)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Logout" style:UIBarButtonItemStyleBordered target:self action:@selector(logout:)];
對於什麼是值得我還要提到的是子視圖是使用XIB定義自動佈局。這裏是我的XIB來源:http://pastebin.com/6RR0zYu4
最後在這裏是如何看起來在iOS 6中
而在iOS的7
有什麼想法?
謝謝你提供的答案,它真的幫了我。 – titicaca
非常感謝您的回答保存我的一天! –
它只適用於iOS7,如果你在iOS6運行設備運行應用程序,它會給出異常,因爲iOS7 SDK屬性 –