iphone - 更改枚举类型值

标签 iphone objective-c ios xcode enums

您好,我正在使用图书馆。它有一些嵌入在枚举中的选项,但我不知道如何配置它们。该库称为PPRevealSideViewController
它具有一个属性:

@property (nonatomic, assign) PPRevealSideOptions options;

这是枚举代码:
enum {
    PPRevealSideOptionsNone = 0,
    PPRevealSideOptionsShowShadows = 2 << 1, /// Disable or enable the shadows. Enabled by default
    PPRevealSideOptionsBounceAnimations = 1 << 2, /// Decide if the animations are boucing or not. By default, they are
    PPRevealSideOptionsCloseCompletlyBeforeOpeningNewDirection = 1 << 3, /// Decide if we close completely the old direction, for the new one or not. Set to YES by default
    PPRevealSideOptionsKeepOffsetOnRotation = 1 << 4, /// Keep the same offset when rotating. By default, set to no
    PPRevealSideOptionsResizeSideView = 1 << 5, /// Resize the side view. If set to yes, this disabled the bouncing stuff since the view behind is not large enough to show bouncing correctly. Set to NO by default
};
typedef NSUInteger PPRevealSideOptions;

非常感谢你!

最佳答案

obj.options = opt0 | opt1 | ... etc

例如:obj.options = PPRevealSideOptionsBounceAnimations | PPRevealSideOptionsResizeSideView;

关于iphone - 更改枚举类型值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11500199/

相关文章:

ios - 解压缩文件进度在 block 内不起作用

iphone - Obj-C,如何处理在某些 View 上而不是其他 View 上被挤压的背景图像?

iphone - 如何在查看 UITableView 时重新加载它

objective-c - '+实体名称 : nil is not a legal NSManagedObjectContext parameter - Core Data

ios - 在 Swift 中从 TableViewCell 类切换 View Controller

iphone - 如何从 CALayer 中仅获取部分矩形?

ios - 未能找到 zlib 的构建 b/c 符号

ios - 如果用户拒绝推送通知提示的回调方法?

ios - 添加每个 UITableViewCell 单元格中每次出现的键

ios - 为左右按钮设置自定义 UINavigationBar 图像