Reputation: 2495
Hello I am using a library. It has some options embedded in enum, but i can't figure out how to configure them. The library is called PPRevealSideViewController. It has a property:
@property (nonatomic, assign) PPRevealSideOptions options;
Here is the enum code:
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;
Thank you very much!
Upvotes: 1
Views: 301
Reputation: 284
I made a documentation of this controller for that purpose. Well, my bad, this method is not very highlighted, but does exist :
You can reset an option using - (void) resetOption:(PPRevealSideOptions)option;
(behind, it is low level : _options ^= option;
)
Or set an option by using - (void) setOption:(PPRevealSideOptions)option
. There is even a setOptionS method ;)
Upvotes: 1
Reputation: 1806
obj.options = opt0 | opt1 | ... etc
For example: obj.options = PPRevealSideOptionsBounceAnimations | PPRevealSideOptionsResizeSideView;
Upvotes: 2