iOS 6: Parent modal's modalPresentationStyle ignored after rotation

前端 未结 3 757
太阳男子
太阳男子 2021-02-05 01:47

With iPad with iOS6, we have this bug where a modal view controller will expand to full screen, even if it is told to be using \"form sheet\" presentation style. But, this hap

3条回答
  •  隐瞒了意图╮
    2021-02-05 02:36

    Not sure if this should be considered as a bug and I'm curious what iOS 7 will bring, but the current workaround for this issue is to set modalPresentationStyle to UIModalPresentationCurrentContext for the child-viewController.

    Set modalPresentationStyle = UIModalPresentationCurrentContext
    

    This makes the child still beeing presented as FormSheet but prevents the parent from beeing resized to fullscreen on rotation.

    Dirk

提交回复
热议问题