Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c TSAlertView启用设备旋转_Objective C_Ios_Rotation_Uialertview - Fatal编程技术网

Objective c TSAlertView启用设备旋转

Objective c TSAlertView启用设备旋转,objective-c,ios,rotation,uialertview,Objective C,Ios,Rotation,Uialertview,因为我需要一个更自定义的UIAlertView,所以我使用了。我的问题是,即使我禁用了它,它也可以使设备在任何方向旋转 在AlertView显示之前,横向模式被禁用,但当我调用show时,任何方向都是可能的 这是怎么回事?我在UIAlertView中没有此行为。转到@implementation TSAlertViewController并选中shouldAutorotateToInterfaceOrientation @implementation TSAlertViewController

因为我需要一个更自定义的UIAlertView,所以我使用了。我的问题是,即使我禁用了它,它也可以使设备在任何方向旋转

在AlertView显示之前,横向模式被禁用,但当我调用show时,任何方向都是可能的


这是怎么回事?我在UIAlertView中没有此行为。

转到
@implementation TSAlertViewController
并选中
shouldAutorotateToInterfaceOrientation

@implementation TSAlertViewController
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return NO;
}