When utilizing storyboards and including constraints which might be put in with Dimension Class wR hR
, the right constraints will not be being utilized when constructing on iPad Simulator or actual machine. Solely the constraints which might be put in with wC hR
are being utilized.
This problem occurs on Xcode 16 & Xcode 16.1, however doesn’t happen in Xcode 15 variations. I am shocked nobody else has reported this problem but, so undecided its one thing I’m doing particularly to copy this problem. To assist confirm I’ve created a pattern challenge and am in a position to re-create the difficulty.
I’ve additionally filed suggestions to Apple about this (FB15647804) and included the beneath steps to re-create utilizing that pattern challenge, however they’ve but to reply.
Steps to Reproduce:
- Run linked Xcode challenge
SizingClassTest
from this public git repo: https://github.com/bmjohns/SizingClassTest which has 1 label
that has a constraint put in withwC hR
and one other put in
withwR hR
- Construct on iPad 18+ simulator and choose button
- View that label is showing at prime of view, the place it needs to be showing at backside (per storyboard)
- Run on iPhone simulator 18+, view that label is showing at prime as anticipated
Can anybody assist affirm if this problem additionally occurs to them?
The one workaround I’ve give you to this point is to refactor the code to manually set the constraints as lively/inactive programmatically primarily based on machine attributes, however that may be a massive time-consuming effort for our challenge.