gpt4 book ai didi

ios - 为什么我的界面被压扁了?

转载 作者:行者123 更新时间:2023-12-01 19:13:34 24 4
gpt4 key购买 nike

我最近使用 Storyboard将我的项目从使用 xib 文件的 ios4 转换为 ios6。转换我界面中的中央按钮后,它们被压在一起了。我在 Storyboard中使用自动布局。

Storyboard View :
enter image description here

iPhone 6.0 模拟器 View
enter image description here

用于交换 xib 和 StoryBoard 的 AppDelegate 代码

    UIStoryboard*  sb = [UIStoryboard storyboardWithName:@"MainStoryboard"
bundle:nil];
self.viewController = [sb instantiateInitialViewController];
//self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];//Change this back if all doesnt not go well

最佳答案

这是由于自动布局而发生的。您有正在调整对象的约束。如果您想使用 autoLayout,我建议您观看 WWDC 视频“Session 202 - Introduction to Auto Layout for iOS and OS X”和/或阅读 Understanding Autolayout

关于ios - 为什么我的界面被压扁了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14842323/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com