Landscape xib appears as portrait

前端 未结 2 1272
走了就别回头了
走了就别回头了 2021-02-14 15:38

I have a view controller and separate nib files for portrait and landscape. On rotating, I load the respective nib. The methods

 shouldAutorotateToInterfaceOrie         


        
2条回答
  •  情话喂你
    2021-02-14 16:07

    Are you adding the view loaded from nib as subView? If Only the status bar is rotating it means your previous view is hung while releasing the view and adding the new view.Can you tell how are you adding the view loaded from xib to the SuperView.

    Make sure you are releasing the previous view correctly while loading the other view,put NSLOG in dealloc of the views and check whether the view is getting released completely.

提交回复
热议问题