Forcing an iPad app to show splitView even in Portrait orientation(Like the Settings iPad app)

前端 未结 9 1415
不知归路
不知归路 2020-12-16 08:25

I am trying to develop a splitView based iPad app, that displays the split interface in every orientation. I have tried subclassing the UISplitViewController class as given

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-16 08:36

    you just need to add this delegate method to your detail view manager
    
        - (BOOL)splitViewController:(UISplitViewController *)svc 
           shouldHideViewController:(UIViewController *)vc 
                      inOrientation:(UIInterfaceOrientation)orientation
        {
            // Hide split view in portrait mode
            //return UIInterfaceOrientationIsPortrait(orientation);
    
            // Show Split view in portrait mode
            return NO;
        }
    
    //vKj
    

提交回复
热议问题