This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
DDPopoverBackgroundView.h
executable file
·85 lines (65 loc) · 1.91 KB
/
DDPopoverBackgroundView.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//
// DDPopoverBackgroundView.h
// https://github.com/ddebin/DDPopoverBackgroundView
//
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#import <UIKit/UIKit.h>
#import <UIKit/UIPopoverBackgroundView.h>
/**
`DDPopoverBackgroundView` is a class to help customizing `UIPopoverController` popovers.
*/
@interface DDPopoverBackgroundView : UIPopoverBackgroundView
{
CGFloat arrowOffset;
UIPopoverArrowDirection arrowDirection;
UIImageView *arrowImageView;
UIImageView *popoverBackgroundImageView;
}
@property (nonatomic, readwrite) CGFloat arrowOffset;
@property (nonatomic, readwrite) UIPopoverArrowDirection arrowDirection;
/**
Adjust content inset (~ border width)
@param contentInset The content inset
*/
+ (void)setContentInset:(CGFloat)contentInset;
/**
Set tint color used for arrow and popover background
@param tintColor A `UIColor` for tint
*/
+ (void)setTintColor:(UIColor *)tintColor;
/**
Enable/disable shadow under popover
@param shadowEnabled Whether or not to enable shadow
*/
+ (void)setShadowEnabled:(BOOL)shadowEnabled;
/**
Set arrow width (base)
@param arrowBase Arrow width
*/
+ (void)setArrowBase:(CGFloat)arrowBase;
/**
Set arrow height
@param arrowHeight Arrow height
*/
+ (void)setArrowHeight:(CGFloat)arrowHeight;
/**
Set the background image corners radius
@param cornerRadius Border corner radius
*/
+ (void)setBackgroundImageCornerRadius:(CGFloat)cornerRadius;
/**
Set custom images for background and top/right/bottom/left arrows
@param background Image for background
@param top Image for top
@param right Image for right
@param bottom Image for bottom
@param left Image for left
*/
+ (void)setBackgroundImage:(UIImage *)background top:(UIImage *)top right:(UIImage *)right bottom:(UIImage *)bottom left:(UIImage *)left;
/**
Rebuild pre-rendered arrow/background images
*/
+ (void)rebuildArrowImages;
@end