-
Notifications
You must be signed in to change notification settings - Fork 248
/
FPPopoverView.h
58 lines (44 loc) · 2.04 KB
/
FPPopoverView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// FPPopoverView.h
//
// Created by Alvise Susmel on 1/4/12.
// Copyright (c) 2012 Fifty Pixels Ltd. All rights reserved.
//
// https://github.com/50pixels/FPPopover
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
typedef enum FPPopoverArrowDirection: NSUInteger {
FPPopoverArrowDirectionUp = 1UL << 0,
FPPopoverArrowDirectionDown = 1UL << 1,
FPPopoverArrowDirectionLeft = 1UL << 2,
FPPopoverArrowDirectionRight = 1UL << 3,
FPPopoverNoArrow = 1UL << 4,
FPPopoverArrowDirectionVertical = FPPopoverArrowDirectionUp | FPPopoverArrowDirectionDown | FPPopoverNoArrow,
FPPopoverArrowDirectionHorizontal = FPPopoverArrowDirectionLeft | FPPopoverArrowDirectionRight,
FPPopoverArrowDirectionAny = FPPopoverArrowDirectionUp | FPPopoverArrowDirectionDown |
FPPopoverArrowDirectionLeft | FPPopoverArrowDirectionRight
} FPPopoverArrowDirection;
#ifndef FPPopoverArrowDirectionIsVertical
#define FPPopoverArrowDirectionIsVertical(direction) ((direction) == FPPopoverArrowDirectionVertical || (direction) == FPPopoverArrowDirectionUp || (direction) == FPPopoverArrowDirectionDown || (direction) == FPPopoverNoArrow)
#endif
#ifndef FPPopoverArrowDirectionIsHorizontal
#define FPPopoverArrowDirectionIsHorizontal(direction) ((direction) == FPPopoverArrowDirectionHorizontal || (direction) == FPPopoverArrowDirectionLeft || (direction) == FPPopoverArrowDirectionRight)
#endif
typedef enum {
FPPopoverWhiteTint,
FPPopoverBlackTint,
FPPopoverLightGrayTint,
FPPopoverGreenTint,
FPPopoverRedTint,
FPPopoverDefaultTint = FPPopoverBlackTint
} FPPopoverTint;
@interface FPPopoverView : UIView
@property(nonatomic,strong) NSString *title;
@property(nonatomic,assign) CGPoint relativeOrigin;
@property(nonatomic,assign) FPPopoverTint tint;
@property(nonatomic,assign) BOOL draw3dBorder;
@property(nonatomic,assign) BOOL border; //default YES
-(void)setArrowDirection:(FPPopoverArrowDirection)arrowDirection;
-(FPPopoverArrowDirection)arrowDirection;
-(void)addContentView:(UIView*)contentView;
@end