How to apply top offset for status bar in iOS7 for UITabBarController children only

后端 未结 2 1806
醉话见心
醉话见心 2021-01-18 05:27

My app is a UITabBarController based app with 3 children vc. The status bar is overlapping with my viewcontrollers. I have tried everything I have found in SO:

    <
2条回答
  •  时光说笑
    2021-01-18 06:26

    Well, I have the same problem as you. I fixed it with many moves. I use ruby motion:

    @window.bounds = CGRectMake(0, -20, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height - 20)
    @window.frame = CGRectMake(0, 0, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height)
    ....
    tabBarController.view.bounds = CGRectMake(0, 20, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height - 20)
    

    Let me know how it's going at your end.

    update: attach the screenshot:enter image description here

提交回复
热议问题