hiding TabBar when rotating iPhone device to landscape

前端 未结 8 1615
旧时难觅i
旧时难觅i 2020-12-09 12:21

So here is what i have: A UITabBarController that handles different UIViewControllers. In one of the UIViewController i am trying to switch the view being displayed when the

8条回答
  •  猫巷女王i
    2020-12-09 12:53

    I needed tab bar to go into full screen mode in landscape view and I tried the approach suggested above using

    transView.frame = CGRectMake(0, 0, 480, 320 );

    This turned out to be a hacky solution and posed many problems such as with hiding and re-displaying the status bar (the view would overlap with the status bar when it is re-displayed after exiting portrait view). I would not recommend this. What worked for me perfectly in the end was pushing a new view controller containing the landscape view and using delegation to reuse the functionality of the original VC.

提交回复
热议问题