I am not using Auto Layout however I wish to be able to make my (very complex) app adapt to Split View multi-tasking on the iPad. For this, ideally to do it right, I want to support size classes without going down the Auto Layout route. Watching the WWDC 406 session it seems that one can programmatically do this, but I am not sure since they've used Autolayout in every example and even Interface builder does not support it otherwise.
Will I run into any issues if I was to listen to notifications regarding trait changes and do everything programmatically or using pins and struts? I have everything defined in Storyboards but I'd like to be able to support differently sized view controllers when the iPad is showing two apps side by side in iOS 9. Please advise.
Master-Detail Application
template and disabling autolyaout for storyboard. – WorkingmanSize Classes
checkbox is unchecked. but split view controller's behaviour does not changed andtraitCollectionDidChange
is called after rotation – WorkingmanStoryboard
, you are most of the way there: whileautolayout
for a givenUIView
is an all-or-nothing proposal, eachUIView
may elect to use or not to useNSLayoutConstraint
, independently of that view's siblings. – CommercialtraitCollectionDidChange
, is that the recommended alternative? Anything else I need to know? I really dislike autolayout as it's complicated for more sophisticated custom UI layouts. – CollaborateAutoLayout
andStoryboard
until I found this amazing tutorial: raywenderlich.com/50317/…. I now recommend most project I oversee or architect to make the switch. You can do it 1 view at a time (just like load from NIB), so it is not nearly as painful as it sounds. You will be glad you switched, if nothing else, for the portability to iPhone, iPad and Apple Watch. 0 coding is the way to go! – Commercial