代碼:的UINavigationController donesn't正常工作
UINavigationController * childNaviVC = [[UINavigationController alloc] initWithRootViewController:self.subVC];
[self addChildViewController:childNaviVC];
[self.view addSubview:childNaviVC.view];
[childNaviVC.view setFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
self.subVC.view.frame = childNaviVC.view.frame;
[childNaviVC.view addSubview:self.subVC.view];
[childNaviVC didMoveToParentViewController:self];
我想要做的就是添加一個UINavigationController
(childNaviVC)爲子視圖 - 控制指定的VC(subVC),並使用UINavigationController
的根來的viewController顯示內容; 我遇到的問題是UINavigationController
的根視圖(subVC)的大小是與UINavigationController
一致的父VC
感謝
我只是想顯示viewWillAppear中功能不起作用 – Snail
設幀的大小是偏移導航欄? – Snail
childrenVC的導航欄 – shallowThought