안녕하세요 저는 라이브러리를 사용하고 있습니다. 그것은 열거 형에 포함 된 몇 가지 옵션이 있지만 그들을 구성하는 방법을 알아낼 수 없습니다. 라이브러리는 PPRevealSideViewController입니다. 그것은 속성이 있습니다 :enum 유형 값을 변경하십시오.
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;
가 대단히 감사합니다 :
다음@property (nonatomic, assign) PPRevealSideOptions options;
는 열거 코드입니다! 예를 들어
아직 이해가 가지 않습니다. PPRevealSideOptionsBounceAnimations를 0으로 변경하는 방법 (예 : 수신 거부) – Devfly
옵션은 int에 저장되고'11001000'과 같이 사용됩니다. 이것은 PPRevealSideOptionsShowShadows + PPRevealSideOptionsBounceAnimations + PPRevealSideOptionsResizeSideView에 해당합니다. 따라서이 int를 '10001000'으로 변경해야합니다. 그래서 당신은 단지'obj.options = obj.options & ~ PPRevealSideOptionsBounceAnimations'을 만들고 비트 단위 연산을 사용하여 구체적인 비트의 값을 변경합니다. –
비트 연산자는 실제로? 이것은 매우 낮은 수준의 솔루션입니다. 그것은 작동하지만, 이제는 내 그림자가 다른 옵션과 함께 사라졌습니다. – Devfly