When I open a calendar event in my app using EKEventViewController
using the code below it correctly displays my event in a modal view.
let eventModalVC = EKEventViewController()
eventModalVC.event = myEvent
eventModalVC.allowsEditing = true
present(eventModalVC, animated: true, completion: nil)
In portrait mode (using iOS 15) I can dismiss the modal using a swipe-down gesture. However, when I change to landscape orientation, the gesture does not work, and there is no back or cancel button either (like there is for the EKEventEditViewController
). I could not find any property of the view controller that would enable me to dismiss it.
So the user is either stuck or has to turn the device into portrait mode. How can I fix this?