Manually Adjusting UI for Rotation
Posted
by Driss Zouak
on Stack Overflow
See other posts from Stack Overflow
or by Driss Zouak
Published on 2010-03-29T21:30:07Z
Indexed on
2010/03/29
21:33 UTC
Read the original article
Hit count: 243
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.
© Stack Overflow or respective owner