سؤال

I would like to design my iPhone App so that, e.g., my buttons are centered, or my inputs are set to the full viewport width and so on. Is this possible using only the storyboard, or do I have to create every view element in the controller and then alter it on orientation change?

هل كانت مفيدة؟

المحلول

Yes this is possible with "AutoLayout",

I would recommend this tutorial for a better understanding:

http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2

نصائح أخرى

In Xcode 5, Auto-layout is enabled by default. You also may want to try adding the recommended constraints from the Editor menu.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top