I have a controller which should be rotated with interface (device) orientation change. I track orientation changes, however i'm unable to rotate the view with the device orintation changes.
I can animate the views inside, and switch their constraints etc, but i'd like to use Size classes for that. When i switch to UIModalPresentationStyleCurrentContext on presenting the controller it works, but messes with my navigation and tabbar, and i would like to do it this way.
Can it be done this way?
Ok, solved it.
I track device orientation changes by putting this in viewDidLoad of the controller which needs to change orientation:
Then in orientationChanged:
In order for that to work in the parent controller i added these :
Also, for rotation to work recorder controller has to implement these:
Hopefully somebody finds this useful.