简体   繁体   中英

Why portrait content displayed inside the landscape orientation?

For a view controller, I am using the following code to restrict the orientation to landscape.

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
   // Return YES for supported orientations
   return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

However, the display result is not correct

It shows the portrait content inside the landscape window.

what will be the possible cause?

从info.plist中删除不需要的方向,或者只是在ios中通过“自动布局”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM