Search code examples
ios7uiinterfaceorientationekevent

Avoid rotation of EKEventEditViewController


How to avoid rotation of EKEventEditViewController? In my case I need to restrict it to Portrait only. Can we change the navigation controller of EKEventEditViewController?


Solution

  • Found a workaround.

    Create a subclass EKEventEditViewController, and in that class override

    -(BOOL)shouldAutorotate{
    //Does not support anything other than portrait
       return NO;
    }
    

    Then in use that custom class instead of EKEventEditViewController.