把一个控制器采用如下方式进行强制横屏播放视频, 代码中有UIAlertView相关代码, 被执行时出现如下错误
```
- (BOOL)shouldAutorotate
{
return NO;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}
```
强大的网友提供了这个crash的解决思路, 我给UIAlertViewController建了一个分类(Category), 然后.m文件中重写 shouldAutororotate, 返回NO...问题即解决