iphone - 如何以编程方式设置导航栏的位置

标签 iphone ios uinavigationbar

如何以编程方式设置导航栏的位置? Autolay 已被关闭,因为它会在其他 IOS 中引起问题。干杯伙计们。

[我的布局]

View Controller
   View
     Toolbar
     WebView
     Navigation Bar
      Nav Item
   First Responder
   Exit

导航栏目前出现在屏幕底部,而不是我想要的顶部。

最佳答案

试试这个

[self.navigationController.navigationBar setFrame:CGRectMake(x,y,width,height)];

关于iphone - 如何以编程方式设置导航栏的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13765156/

相关文章:

ios - UITapGestureRecognizer 不在导航栏标题 View 中的 UIView 上工作?

iPhone UINavigationBar 使用 [UINavigationBar appearance] 更改所有 Controller 的字体样式

iphone 默认 map 应用程序以不同语言打开

iphone - 将 IBOutlet 连接到 UITextField 后出错

ios - info.plist 包显示名称本地化

ios - 在真实设备上的 SwiftUI 中,从浅色模式到深色模式的颜色变化不起作用

Swift 4后退按钮没有出现

ios - fatal error : unexpectedly found nil while unwrapping an Optional value in Tableview

iphone - iOS开发的软硬件要求

ios - 分析 Apple 崩溃报告