forked from alvises/FPPopover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FPPopoverView.h
57 lines (42 loc) · 1.88 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
//
// 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 {
FPPopoverArrowDirectionUp = 1UL << 0,
FPPopoverArrowDirectionDown = 1UL << 1,
FPPopoverArrowDirectionLeft = 1UL << 2,
FPPopoverArrowDirectionRight = 1UL << 3,
FPPopoverArrowDirectionVertical = FPPopoverArrowDirectionUp | FPPopoverArrowDirectionDown,
FPPopoverArrowDirectionHorizontal = FPPopoverArrowDirectionLeft | FPPopoverArrowDirectionRight,
FPPopoverArrowDirectionAny = FPPopoverArrowDirectionUp | FPPopoverArrowDirectionDown |
FPPopoverArrowDirectionLeft | FPPopoverArrowDirectionRight
} FPPopoverArrowDirection;
#define FPPopoverArrowDirectionIsVertical(direction) ((direction) == FPPopoverArrowDirectionVertical || (direction) == FPPopoverArrowDirectionUp || (direction) == FPPopoverArrowDirectionDown)
#define FPPopoverArrowDirectionIsHorizontal(direction) ((direction) == FPPopoverArrowDirectionHorizontal || (direction) == FPPopoverArrowDirectionLeft || (direction) == FPPopoverArrowDirectionRight)
typedef enum {
FPPopoverBlackTint = 1UL << 0, // default
FPPopoverLightGrayTint = 1UL << 1,
FPPopoverGreenTint = 1UL << 2,
FPPopoverRedTint = 1UL << 3,
FPPopoverDefaultTint = FPPopoverBlackTint
} FPPopoverTint;
@interface FPPopoverView : UIView
{
//default FPPopoverArrowDirectionUp
FPPopoverArrowDirection _arrowDirection;
UIView *_contentView;
UILabel *_titleLabel;
}
@property(nonatomic,retain) NSString *title;
@property(nonatomic,assign) CGPoint relativeOrigin;
@property(nonatomic,assign) FPPopoverTint tint;
-(void)setArrowDirection:(FPPopoverArrowDirection)arrowDirection;
-(FPPopoverArrowDirection)arrowDirection;
-(void)addContentView:(UIView*)contentView;
@end