I have been playing around on Xcode with size classes to try and make sense of it. The problem I have is that many different sized phones all fit into the same size class (like all iPhones in portrait) so I can't home in on a 3.5 inch screen for example. This is frustrating as I would like to change the layout constraints between phones rather than just classes as obviously I need to make the gaps between things larger or the buttons slightly bigger to keep everything in proportion. I don't know if it is something I have missed but it seems the only way I can do this is by creating every single layout constraint I want to change as an outlet and then testing in code for each phone and updating it using a rough estimate and run the thing on the simulator.
In Summary, how can I adjust the constraints based on the size of a device, when they're all in the same class? Using a percentage/proportional constraint should give me the result I'm after.
Well, Size Class has many advantages. It depends on how people viewing it. In specific to your question there is a way to change for all
iPhones in Portrait
and alliPhones below 4.7
inch Size in portrait.Below is the image of that. I can understand supporting 3.5 inch screen with size class is difficult. Setting a proper constraint and using the below class will help you to achieve it.Apple have designed it so that you don't have to think about specific devices. The idea is that you use auto layout so that each screen automatically adjusts to the available space. Size classes is an extension of that so when you get a lot of extra space you can do something slightly different.
If you want to customise your layout to specific devices, you can. Pretty much as you describe it. However, what happens next year when Apple release the iPad Pro and a 4.3" iPod touch (you read about it here first)? In general, there is no need to hard code spacing and sizes; your interface should scale to use the space available, and that's what auto layout and size classes give you.
It's certainly harder to think it terms of constraints rather than a list of known screen sizes, but it should be worth it.