Skip to content

Commit

Permalink
Merge pull request #70 from adly-holler/master
Browse files Browse the repository at this point in the history
NS_OPTIONS for arrow direction, const scroll view reposition delay
  • Loading branch information
nfarina committed Nov 7, 2014
2 parents d4e2cf0 + ada89ea commit 90fb46a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions SMCalloutView.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Version 2.0.3
*/

// options for which directions the callout is allowed to "point" in.
typedef NS_ENUM(NSUInteger, SMCalloutArrowDirection) {
SMCalloutArrowDirectionUp = 1UL << 0,
SMCalloutArrowDirectionDown = 1UL << 1,
typedef NS_OPTIONS(NSUInteger, SMCalloutArrowDirection) {
SMCalloutArrowDirectionUp = 1 << 0,
SMCalloutArrowDirectionDown = 1 << 1,
SMCalloutArrowDirectionAny = SMCalloutArrowDirectionUp | SMCalloutArrowDirectionDown
};

Expand All @@ -26,7 +26,7 @@ typedef NS_ENUM(NSInteger, SMCalloutAnimation) {

// when delaying our popup in order to scroll content into view, you can use this amount to match the
// animation duration of UIScrollView when using -setContentOffset:animated.
extern NSTimeInterval kSMCalloutViewRepositionDelayForUIScrollView;
extern NSTimeInterval const kSMCalloutViewRepositionDelayForUIScrollView;

@protocol SMCalloutViewDelegate;
@class SMCalloutBackgroundView;
Expand Down
2 changes: 1 addition & 1 deletion SMCalloutView.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ @interface UIView (SMFrameAdditions)
#define TOP_ANCHOR_MARGIN 13 // all the above measurements assume a bottom anchor! if we're pointing "up" we'll need to add this top margin to everything.
#define COMFORTABLE_MARGIN 10 // when we try to reposition content to be visible, we'll consider this margin around your target rect

NSTimeInterval kSMCalloutViewRepositionDelayForUIScrollView = 1.0/3.0;
NSTimeInterval const kSMCalloutViewRepositionDelayForUIScrollView = 1.0/3.0;

@interface SMCalloutView ()
@property (nonatomic, strong) UIButton *containerView; // for masking and interaction
Expand Down

0 comments on commit 90fb46a

Please sign in to comment.