Rotate only subview of a uiviewcontroller
I read up other questions and it isn't very clear, as to what I could do about this problem. Decided to ask anyway.
So I have a UIViewController, wherein I block auto-rotation.
I bring up one of the subviews added to the controller. Now, I rotate the device. And this UIView should change orientation, I will use autolayout to support all orientations on this view alone.
Is this possible?
What I tried is to, listen for device orientation changes, and then send the orientation to the subview and then was thinking probably transform, but that won't be accurate and it is probably a lot of work.
So, there isn't any direct method without using another view controller to hitch the view to. Add a new UIViewController and make your UIView the view controller's view. Add your rotation parameters/methods to the newly made view controller.
So its not the best solution because I have to now present that view from a view controller which is adding more code. That's kinda fundamental to a UIView. It can't handle itself unless you write hacks and override your view's behavior.
Another solution is to listen to changes in interface orientations and then relayout your view based on that change.