I compiled my app with Xcode 13 and iOS 15, and I noticed the UIDatePicker
is getting right aligned.
You can see that my storyboard is properly setup with constraints:
This UI element was working fine, even if I download the App Store version of my app on a device running iOS 15, it renders correctly. It’s only compiling it with Xcode 13 that messes is up.
Is anyone else encountering that issue?
2
Answers
The old behavior of the compact Date Picker (UIDatePicker) was aligned to left (with Xcode 12 + iOS 14), but now with Xcode 13 is aligned to right.
I ran into the same problem when using Xcode 13 and found a solution here.
Just a quick follow-up on this – I submitted this issue via Feedback Assistant and Apple told me this is expected behavior:
So the proper solution is as follows: