若是沒有是storyboard進行界面設計,在ios7以後會遇到rootviewcontroller的view被navigationbar遮蓋的問題,其實很好解決ios
- (void)viewDidLoad { [super viewDidLoad]; if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) { self.edgesForExtendedLayout = UIRectEdgeNone; } // Do any additional setup after loading the view from its nib. }