ios - UINavigationController 大小

标签 ios uinavigationcontroller

是否可以为 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];
boundsframe属性将确定导航在屏幕上的显示位置。

关于ios - UINavigationController 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6043158/

相关文章:

ios - 使用导航 Controller 推送后 UIScrollView 滚动不起作用

ios - 导航栏按钮 Action 调用失败

swift - Segue 后 View Controller 调整大小

ios - 如何以编程方式将数据传递给 UITabBarController 实例

ios - EZAudio 停止获取音频

iOS 6 通过 ABPeoplePickerNavigationController 创建新联系人

iOS无法播放视频

iOS - 尝试使用 Fabric 存档时出现构建错误 (Twitter)

ios - 准备转至导航 Controller

swift - setNavigationBarHidden(Bool, Bool) 动画的默认时间间隔