Manually Adjusting UI for Rotation
- by Driss Zouak
In my view I have some number-pad type buttons that I want to manually adjust their X and Y when the view is rotated. I'm having trouble figuring out how to support this.
I have added in my ViewDidLoad
NSNotificationCenter.DefaultCenter.AddObserver("UIDeviceOrientationDidChangeNotification", DeviceRotated );
And I defined my DeviceRotated but the breakpoint is never hit. I thought this might be because of the Autorotate, so I overrided the ShouldAutorotateToInterfaceOrientation and set that to false (true didn't work either).
I figured there should be some WillRotate (but that's a void return type) or something that would allow me to indicate that I want the View to rotate, and whatever is set to auto adjust I'd like it to do that, but that I would like to be able to manually adjust any other items that I need. If I have to do everything myself, that's fine as well.
Any advice would be appreciated,
Driss.