I have an iPad app that has UITabBarControlleras root controller. On one of the tabs I have UIToolBar, which contains UIBarButtonItem, when I click the button, a modal view is launched.
The first time you start (both in landscape and portrait orientation), the modal view is displayed in the correct size, however, if you rotate the device, the modal view will then expand to fill the screen - no matter how you rotate the device from this point and Further.
I launch the modal view from the tab bar and I set ModalPresentationStylein the view to be presented.
This affects ModalView whether it is set to FormSheetor PageSheet.
Has anyone experienced this behavior, if so, how did you solve it?
Many thanks
EDIT
I also noticed that since 4.2 when using the Modal Style Page / FormSheet, the view behind the Modal View no longer dims - am I presenting the view incorrectly or is it just the standard 4.2?
EDIT 2
code: In my default, UIViewControllerI simply present the view of Modal as follows:
void HandleNewMsgButtonTouch(object sender, EventArgs e)
{
PresentModalViewController(new ComposeMsgView(), true);
}
In the modal representation itself, I indicated in the override LoadView:
public override void LoadView()
{
base.LoadView ();
...
...
View.AutoresizingMask = UIViewAutoresizing.None;
ModalPresentationStyle = UIModalPresentationStyle.PageSheet;
ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
}
I exceeded ShouldAutoRotateToInterfaceOrientationto always return true.
, , ( - , PageSheet ), ( ModalView FullScreen).