简体   繁体   English

Xcode 6:情节提要

[英]Xcode 6: Storyboards

I loved Xcode 4 when there was two storyboards, one for the iPhone and one for the iPad. 当有两个故事板时,我喜欢Xcode 4,一个用于iPhone,一个用于iPad。 There was only one screen size to which was the 3.5 inch which made the layout so much easier. 只有一个屏幕尺寸为3.5英寸,这使得布局非常容易。 Then Xcode 5 came along and it was different because the iPhone storyboard layout changed for the 3.5 inch screen and the 4 inch screen and it was quite difficult to use. 然后出现了Xcode 5,它有所不同,因为iPhone故事板的布局更改为3.5英寸屏幕和4英寸屏幕,并且很难使用。 Now Xcode 6 is here and I now only have one Storyboard. 现在Xcode 6在这里,我现在只有一个Storyboard。 I hate it. 我讨厌它。 I cannot get any of my iPhones buttons and labels to line up at all. 我根本无法对齐任何iPhone按钮和标签。 iPhone 4 inch and 4.7 is fine, but the 3.5 is all off. iPhone 4英寸和4.7可以,但3.5可以。 I have tried all those tricks of resetting the suggested constraints too. 我也尝试过所有所有重置建议约束的技巧。 So my question is, is there any way to have more than one storyboard? 所以我的问题是,有没有办法拥有多个情节提要? I would really like to have one for the iPhone 3.5 inch, another for the iPhone 4.0 inch, another for the 4.7 inch, one for the 5.5 inch and one for the iPad. 我真的很想为iPhone 3.5英寸提供一个,为iPhone 4.0英寸提供一个,为4.7英寸提供另一个,为5.5英寸提供一个,为iPad提供一个。 I would also like them to all work fine and not interfere with each other and there layout. 我也希望他们一切正常,并且彼此之间不干扰,也不影响布局。 I am not worried if I have to do everything about 5 times but I would rater spend more time and get the layout correct. 我不必担心是否需要做大约5次操作,但是我会评估一下是否花费更多的时间来使布局正确。 So if this is possible I would be extremely happy! 因此,如果可能的话,我将非常高兴!

You could try loading the storyboard in your AppDelegate. 您可以尝试将故事板加载到AppDelegate中。

Described here: https://stackoverflow.com/a/12553838/866904 在这里描述: https//stackoverflow.com/a/12553838/866904

Create 2 storyboards and then just load the preferred one in your AppDelegate. 创建2个故事板,然后将首选的故事板加载到AppDelegate中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM