ios - 无法调整 viewController 的自动调整大小蒙版

标签 ios objective-c iphone-5 autoresizingmask

我正在尝试将我的应用程序调整为适用于 iPhone 5,但遇到了一些困难。

enter image description here

  1. ContainerViewController 的 header (始终位于顶部)
  2. 容纳其他 ViewController 的 ContainerViewController
  3. SidebarViewController
  4. ContentViewController

因此,容器包含标题、侧边栏和内容 View 。在内容 View 中我有 UINavigationController。我的问题是,当我使用 iPhone 5 时,它会更改所有应用程序的外观,即使当我使用自动调整大小蒙版时,它看起来也很糟糕并且位置不正确,我认为这可能是因为我创建的容器 header 所致。

我这样设置:

enter image description here

这是一个将 UIScrollView 和 UIImageView 作为背景的 View 示例:(注意 UIScrollView 和 UIImageView 的底部,它将它们推到 View 之外。

iPhone 4:

enter image description here

iPhone 5:

enter image description here

这是我第一次使用自动调整大小蒙版,所以请耐心等待。提前致谢!

最佳答案

我不会在内心深处回答这个问题。您将自动调整大小设置错误。 以下是可行的方法。要处理 iPhone5,您只需要 UIViewAutoresizingFlexibleHeight 作为 autoresizingMask

如果您想正确了解自动调整大小,请阅读this

For Container View 对于容器

For Header 对于标题

For Content View 对于内容

For SideBar 对于侧栏

关于ios - 无法调整 viewController 的自动调整大小蒙版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15475150/

相关文章:

iOS 13 UISearchController + UIRefreshControl 故障

objective-c - 弱和强属性示例

ios - 如何为 armv7s 设备编译

iphone - 针对 iPhone 5 进行了优化

javascript - 如何用Cordova实现onReset?

ios - 在制作自定义 UIButton 时,以 NSException 类型的未捕获异常终止

iphone - 使用自定义 segue 动画将一个 View 替换为另一个 View ?

ios - 当应用程序在选项卡栏 Controller 中加载时,特定选项卡栏项目会隐藏吗?

ios - NSJsonSerialzation 未解析 Facebook 的结果 - Cocoa 错误 3840

iPhone 5尺寸突然支持了?