我很想知道是否有某种方法可以确定 iPhone/iPad 上屏幕的方向。
目前,我发现自己在调用此消息时设置了一个成员变量:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
self.orientation = interfaceOrientation;
return YES;
}
...感觉就像我应该能够查询状态而不是在它发生变化时跟踪它。