草庐IT

UIInterfaceOrientationMask

全部标签

c++ - 通过用于 Objective-C/iOS 的 UIInterfaceOrientationMask 了解 C++ 枚举

UIInterfaceOrientationMaskisdefinedas:typedefenum{UIInterfaceOrientationMaskPortrait=(1为了简单的工作,让我们简化枚举:typedefenum{UIInterfaceOrientationMaskPortrait=(1这意味着:typedefenum{UIInterfaceOrientationMaskPortrait=0001,UIInterfaceOrientationMaskLandscapeLeft=0010,UIInterfaceOrientationMaskLandscapeRight=0

iphone - 如何使用 UIInterfaceOrientationMask

我一直在尝试在我的Swift代码中使用UIInterfaceOrientationMask。在Objective-C中,我会将它用作枚举,当我需要使用时,例如,肖像mask,我会在我的代码中简单地使用UIPortraitOrientationMask,如下所示:NSUIntegerorientations=UIInterfaceOrientationMaskPortrait;我不太确定我应该如何处理这些文档,而且我在教程书籍或文档中的任何地方都找不到有关“原始选项集”的任何信息。 最佳答案 从Xcode7开始,Swift版本2.0:
12