Only Change Orientation on Function Call
Most of this question is in its title. I just can't seem to find any information regarding this. I would like to only change (between portrait and landscape) orientations on a function call, not by the user holding the device. Is there any way to do this in IOS? If the function is not called then the orientation shall remain the same regardless.
I also want this on a single view controller. If a user switches to another view controller, then normal functionalities shall resume.
Since you need this only in the current view, you can make use of UIView transform property. For eg:, if you want to rotate the view by 90 degress, use this,
view.transform = CGAffineTransformMakeRotation( M_PI / 2 );
You cannot do this. There are private apis that can let this happen but using them would cause a rejection from the App Store
Hi jab you can but the statusbar we cannot change without device orientation only the ui components which are available on view can change by changing their CGRect values(Frame values).