开发者

ModalViewController does not fire WillRotate method

A have an application that has a controller and after swipe it shows another controller as a modal dialog. This showing I do with calling PresentModalViewController(myControl, true). When I have four modal dialogs opened (application maximum) the las开发者_C百科t one does not fire WillRotate method. Simply if I put a breakpoint it is not hit and the code I have in this method Override is not being processed.

Are there any count limits for showing modal dialogs?


I'm don't know if there is a count limit for showing modal dialogs but I can provide an alternative solution that may help you get around this problem for the time being.

In your last modal view, you could subscribe to the OrientationDidChange notifications:

NSNotification.DefaultCenter.AddObserver(UIDevice.OrientationDidChangeNotification, HandleDeviceRotated);

where HandleDeviceRotated is a delegate as follows:

void HandleDeviceRotates(NSNotification notification)
{
 // Handle any code you'd like when device rotated.
}

Unfortunately this will take place after the device has rotated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜