在我的 iPhone 应用程序中,我有以下代码来相对于设备方向旋转视图。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return YES;
}
当设备旋转到横向模式时,视图不会旋转。
我试过了 return (interfaceOrientation == UIDeviceOrientationLandscapeLeft);
它不起作用,我该怎么做?该类包含一个搜索栏,像这样的表格视图
提前谢谢