Moving status bar in iOS 7

前端 未结 5 1235
悲哀的现实
悲哀的现实 2020-11-30 17:15

The problem I\'m facing is this:

I want to implement an iOS 7 app with nice design and left/right menu, which appears after the main view animate itself to the righ

5条回答
  •  伪装坚强ぢ
    2020-11-30 18:04

    The gist of it is to use this method introduced in iOS 7:

    https://developer.apple.com/documentation/uikit/uiscreen/1617814-snapshotview:

    With that you get a UIView containing a screenshot that includes the status bar. Once you have that, it's just a matter of hiding your current view then pushing the screenshot view around.

    I posted a proof of concept here: https://github.com/simonholroyd/StatusBarTest

    NOTE I haven't submitted code that does this through the Apple review process, but this is not a private API method.

提交回复
热议问题