From b21c3bb31f5d5e02b5dadefb05b5cef82f4d79e3 Mon Sep 17 00:00:00 2001 From: Anastasiya Gorban Date: Mon, 23 Mar 2015 18:43:17 +0700 Subject: [PATCH] fix #30 - implement bit mask for directions enum --- ZLSwipeableView/ZLSwipeableView.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ZLSwipeableView/ZLSwipeableView.h b/ZLSwipeableView/ZLSwipeableView.h index d632afe..c96a459 100755 --- a/ZLSwipeableView/ZLSwipeableView.h +++ b/ZLSwipeableView/ZLSwipeableView.h @@ -10,16 +10,16 @@ typedef NS_ENUM(NSUInteger, ZLSwipeableViewDirection) { ZLSwipeableViewDirectionNone = 0, - ZLSwipeableViewDirectionLeft, + ZLSwipeableViewDirectionLeft = (1 << 0), + ZLSwipeableViewDirectionRight = (1 << 1), + ZLSwipeableViewDirectionHorizontal = ZLSwipeableViewDirectionLeft | ZLSwipeableViewDirectionRight, - ZLSwipeableViewDirectionHorizontal = ZLSwipeableViewDirectionLeft | - ZLSwipeableViewDirectionRight, - ZLSwipeableViewDirectionUp, - ZLSwipeableViewDirectionDown, - ZLSwipeableViewDirectionVertical = ZLSwipeableViewDirectionUp | - ZLSwipeableViewDirectionDown, - ZLSwipeableViewDirectionAll = ZLSwipeableViewDirectionLeft | - ZLSwipeableViewDirectionRight | ZLSwipeableViewDirectionUp | ZLSwipeableViewDirectionDown, + ZLSwipeableViewDirectionUp = (1 << 2), + ZLSwipeableViewDirectionDown = (1 << 3), + ZLSwipeableViewDirectionVertical = ZLSwipeableViewDirectionUp | + ZLSwipeableViewDirectionDown, + ZLSwipeableViewDirectionAll = ZLSwipeableViewDirectionLeft | + ZLSwipeableViewDirectionRight | ZLSwipeableViewDirectionUp | ZLSwipeableViewDirectionDown, }; @class ZLSwipeableView;