I setup constrains in wAny hAny size class, and it worked on iPhone & iPad simulators.
Then I switched to wAny hCompact size class and made some changes
It looks good in iPhone landscape mode, but change nothing in iPad, because iPad is wRegular hRegular. I try to apply these constrains to wRegular hAny size class, but can't find a quick way to do that. It makes no sense to manually modify all the constrains again. I found that if I double click a constrain in Inspector panel, there's a option to install the constrain to other size classes. But this is only for a single constrain...
So, is it possible to apply all the constraints from one size class to another?
Select the Constrains on the left panel.(Select all the constraints). Then tap on Attribute Inspector on the right panel. Then add the class you want to add like how we add the UI elements.
Ref Image
Thought i'd post this even though Hannes answer was accepted as it might be of use to somebody. You can bulk update the size classes for your constraints by editing the source code directly. Generally a bad idea to edit IB generated XML directly but I have performed an update using good old find and replace and it's saved me a lot of time.
Obvious disclaimer: make a backup of the file in case something goes horribly wrong ...
Look for the nodes like:
In my case I wanted to transplant all my 'Compact Width/Compact Height' constraints to 'Any Width/Compact Height', and was able to achieve this by doing a find/replace of '-widthClass=compact' with an empty string to change 'heightClass=compact-widthClass=compact' to just "heightClass=compact".
To get to source code view right click the storyboard file in xcode and select 'Open As > Source Code'
Pretty straightforward in this instance and a lot easier than doing it in IB as I had lots of constraints to update.
Find and replace story board code: I did this to migrate from compact-regular to any/any . Works for me . Find - heightClass=regular-widthClass=compact Replace - default
For other size clasees find the size string appropriately and resize. Kudos!!
Update constraints at the end. Else everything would be not as expected.
No, you cannot edit all the constraints together.
But for each, you simply click that plus button in front of
Installed
and addwAny hAny
and select that. Then your constraint will apply to all size classes. You can add more options and thus, decide when constraints apply.