forked from onemightyroar/YRDropdownView
/
YRDropdownView.h
139 lines (116 loc) · 5.46 KB
/
YRDropdownView.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
//
// YRDropdownView.h
// YRDropdownViewExample
//
// Created by Eli Perkins on 1/27/12.
// Copyright (c) 2012 One Mighty Roar. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface YRDropdownView : UIView
{
NSString *titleText;
NSString *detailText;
UILabel *titleLabel;
UILabel *detailLabel;
UIImage *backgroundImage;
UIImageView *backgroundImageView;
UIImage *accessoryImage;
UIImageView *accessoryImageView;
UIColor *titleLabelColor;
UIColor *detailLabelColor;
SEL onTouch;
NSDate *showStarted;
BOOL shouldAnimate;
}
@property (copy) NSString *titleText;
@property (copy) NSString *detailText;
@property (assign) UIImage *accessoryImage;
@property (assign) float minHeight;
@property (retain) UIColor *titleLabelColor;
@property (retain) UIColor *detailLabelColor;
@property (nonatomic, assign) UIImage *backgroundImage;
@property (nonatomic, assign) SEL onTouch;
@property (assign) BOOL shouldAnimate;
#pragma mark - View methods
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail
animated:(BOOL)animated;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
animated:(BOOL)animated;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
animated:(BOOL)animated
hideAfter:(float)delay;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
backgroundImage:(UIImage *)backgroundImage
animated:(BOOL)animated
hideAfter:(float)delay;
+ (YRDropdownView *)showDropdownInView:(UIView *)view
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
backgroundImage:(UIImage *)backgroundImage
titleLabelColor:(UIColor *)titleLabelColor
detailLabelColor:(UIColor *)detailLabelColor
animated:(BOOL)animated
hideAfter:(float)delay;
+ (BOOL)hideDropdownInView:(UIView *)view;
+ (BOOL)hideDropdownInView:(UIView *)view animated:(BOOL)animated;
#pragma mark - Window methods
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail
animated:(BOOL)animated;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
animated:(BOOL)animated;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
animated:(BOOL)animated
hideAfter:(float)delay;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
backgroundImage:(UIImage *)backgroundImage
animated:(BOOL)animated
hideAfter:(float)delay;
+ (YRDropdownView *)showDropdownInWindow:(UIWindow *)window
title:(NSString *)title
detail:(NSString *)detail
image:(UIImage *)image
backgroundImage:(UIImage *)backgroundImage
titleLabelColor:(UIColor *)titleLabelColor
detailLabelColor:(UIColor *)detailLabelColor
animated:(BOOL)animated
hideAfter:(float)delay;
+ (BOOL)hideDropdownInWindow:(UIWindow *)window;
+ (BOOL)hideDropdownInWindow:(UIWindow *)window animated:(BOOL)animated;
#pragma mark -
- (void)show:(BOOL)animated;
- (void)hide:(BOOL)animated;
@end