Xcode 6 和 7 的故事板问题
Storyboard issue with Xcode 6 and 7
为什么我的主情节提要如上图所示?我制作了该项目的副本,但现在他们的故事板都遇到了同样的问题!我可以 运行 使用模拟器的应用程序,它工作正常,但我看不到任何标签或按钮。
问题出在您的设备布局上....
实际上它在 wAny hAny
等其他布局上显示,现在您在 wCompact hRegular
等其他布局上显示它...这就是问题发生的原因...
这是它的可视化站点....
To prevent this type of things...you need to give constraints to your objects..after making correct constraints, the size classes won't matter that much except adaptive layout
这是因为自动布局的东西。为您的标签对象设置适当的自动布局。
例如。
为您的标签设置 Leading,Trailing,Top & Bottom
布局,然后 运行 您的应用程序。您将能够在屏幕上看到它。
为什么我的主情节提要如上图所示?我制作了该项目的副本,但现在他们的故事板都遇到了同样的问题!我可以 运行 使用模拟器的应用程序,它工作正常,但我看不到任何标签或按钮。
问题出在您的设备布局上....
实际上它在 wAny hAny
等其他布局上显示,现在您在 wCompact hRegular
等其他布局上显示它...这就是问题发生的原因...
这是它的可视化站点....
To prevent this type of things...you need to give constraints to your objects..after making correct constraints, the size classes won't matter that much except adaptive layout
这是因为自动布局的东西。为您的标签对象设置适当的自动布局。
例如。
为您的标签设置 Leading,Trailing,Top & Bottom
布局,然后 运行 您的应用程序。您将能够在屏幕上看到它。