Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个具有纵向和横向方向的项目。我应该怎么做才能只保持几个屏幕可旋转?
玩:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); }
如果您有UITabBarController,那么您将遇到问题,因为要么全部旋转,要么不旋转。虽然我认为有一些解决方法。
UITabBarController