ios - 枚举值 'UIInterfaceOrientationUnknown' 未在开关中处理

标签 ios iphone xcode

  switch(_outputImageOrientation)
            {
                case UIInterfaceOrientationPortrait:outputRotation = kGPUImageRotateRightFlipVertical; break;
                case UIInterfaceOrientationPortraitUpsideDown:outputRotation = kGPUImageRotate180; break;
                case UIInterfaceOrientationLandscapeLeft:outputRotation = kGPUImageFlipHorizonal; break;
                case UIInterfaceOrientationLandscapeRight:outputRotation = kGPUImageFlipVertical; break;

这是我的代码,我收到以下错误: 枚举值“UIInterfaceOrientationUnknown”未在开关中处理

有人能帮忙吗?

最佳答案

只需在您的开关中添加 default:break; 语句即可。

关于ios - 枚举值 'UIInterfaceOrientationUnknown' 未在开关中处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26212980/

相关文章:

ios - ViewController 不符合 Swift 上的协议(protocol)

objective-c - 如何设置成长效果以在该 View 内播放视频?

ios - 不使用 navigationController 的 SWrevealViewController

ios - 在 Collection View 的 cellForItemAtIndexPath 方法中更改框架

iphone - UIColor -initWithRed :green:blue:alpha: memory leak?

c++ - 如何在 XCode 的 cocos2d-x 项目中使用 sqlite3

ios - "setFrame"不适用于 iOS 中的 UIScrollView

ios - 加载一个 View Controller ,然后从内存中删除前一个

ios - Apple 开发者注册 bundle ID

Xcode 9 UITest 不工作