开发者

UIModalTransitionStylePartialCurl not rotating

I've got a modal view controller that is being displayed using UIModalPresentationFullScreen with the TransitionStyle set 开发者_JAVA百科as UIModalTransitionStylePartialCurl. This works beautifully.

My problem is that when the device is rotated, my view rotates (as intended), but the "curl" effect does not. Does anyone know if this is by design, or is there something else that needs to be done? Thanks.


In my experience the UIModalTransitionStylePartialCurl style puts both view controllers involved in a state of semi limbo where they don't play by the normal rules. Another example of this is that the partial curl modal presentation doesn't seem to respect the view hierachy's modal over ride, meaning that when you have modal views stacked, if you display a modal higher up the stack it should take over, however the partial curl blocks this.

e.g. the views modally displaying other views: view 1 -> view 2 -> view 3 Tell view 1 to modally display view 4 view 1 -> view 4 If view 3 is displaying as partial curl, nothing will happen when you request the display of view 4.

Additionally you can not display other views modally under a partial curl (official documentation states this, which inherently means it does not behave like a normal modal display) e.g. view 1 -> view 2 (partial curl) tell view 2 to modally display view 3 nothing happens

IMO apple hasn't fully baked the UIModalTransitionStylePartialCurl style which is a shame because it's fantastic. Long story short, expect problems when using it as it does not behave as expected when asked to do anything beyond just flip up and down.


When I ran into this problem I decided it was okay for the modally presented view to be automatically dismissed in deviceDidRotateSelector so thereby avoiding the problem.


Check if your ViewController that you are presenting has shouldAutorotateToInterfaceOrientation: implemented and it's returning the desired value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜