是否可以为 UINavigationController View 设置自定义大小?
我需要将分层列表嵌入到 View 中,并且我不希望 UINavigationController 全屏显示。
其他解决方案?
提前致谢。
最佳答案
您可以创建 UINavigationController,然后将其 View 定位为其他东西的 subview 。例如:
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:root];
UIView * somethingElse = [self getSomethingElse];
[somethingElse addSubView:nav.view];
[nav setBounds:theBoundsWeWant];
[nav setFrame:theFrameWeWant];
bounds
和 frame
属性将确定导航在屏幕上的显示位置。
关于ios - UINavigationController 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6043158/