Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

melman101

macrumors 68030
Original poster
Sep 3, 2009
2,751
295
I used to code with XCode back on iOS 3 and 4, so I've been out of the game for a bit. I've gotten back into coding and got the app I want coded, however, I am having trouble with this storyboard interface building.

I built the app using the Any / Any size class, and I took my UIWebView and I pinned it using Editor | Pin | and I clicked all the options (Trailing Space, Leading Space, Bottom Space, Top Space). For all my iphones / ipad this works amazingly well.

However, i would like to add an additional uiwebview when using just an iPad since I have screen real estate. When I go to the size classes at the bottom and change it to Regular / Any, it affects my Any / Any size class, and my Pin constraints go away, and everything breaks.

Can anyone help? Is this possible to do, to have one storyboard with different layouts for iPhone / iPad? Please help! Thanks!
 
John Marquez on the Apple Developer Forums responded with this

"I've seen that problem, and it seems to occur when constraints are misconfigured. Try resetting to default constraints and see if that works or if it gets you close enough to fix any special constraints your UI has.

Save your work, then use the Constraint toolbar or Editor menu to Resolve Auto Layout Issues for "All Views"
1. Clear constraints
2. Add missing constraints

Then test the different size classes.

When constraints are configured correctly, the UI _should_ appear as expected on all devices and when selecting different size classes in IB simulator."

And it fixed my issue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.