My development team has implemented the new iOS 14 date picker in the "compact" style, which pops a modal on top of our application. It doesn't have any controls to dismiss. As a user, I can tap outside the modal, which I figured application.windows.firstMatch.tap()
would simulate well. It does when I'm debugging, but when running regularly, it is also dismissing the view behind the modal. Kind of confusing as to why it would act differently, but :shrug:
I've suggested we move to the "inline" style, but may not get my way (it's a better UX in our use-case anyway). Is anyone successfully dismissing these without unintended consequences?
This worked on the iPhone.
Maybe if this dimisses too much on iPad you need to set
definesPresentationContext = true
on your view controller?