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.
我已经设置shouldAutorotateToInterfaceOrientation为返回 YES 以进行定位,但我注意到随着 iPhone 旋转,背景也随之旋转,这是一个UIImageView. 如何固定背景使其不旋转?
shouldAutorotateToInterfaceOrientation
UIImageView
这似乎奏效了。我把所有东西都固定在横向模式下。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); }