-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathCODialog.h
65 lines (49 loc) · 1.86 KB
/
CODialog.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
//
// CODialog.h
// CODialog
//
// Created by Erik Aigner on 10.04.12.
// Copyright (c) 2012 chocomoko.com. All rights reserved.
//
#import <UIKit/UIKit.h>
enum {
CODialogStyleDefault = 0,
CODialogStyleIndeterminate,
CODialogStyleDeterminate,
CODialogStyleSuccess,
CODialogStyleError,
CODialogStyleCustomView
};
typedef NSInteger CODialogStyle;
@interface CODialog : UIView
@property (nonatomic, strong) UIView *customView;
@property (nonatomic, assign) CODialogStyle dialogStyle;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *subtitle;
@property (nonatomic, assign) CGFloat progress;
@property (nonatomic, assign) NSTimeInterval batchDelay;
+ (instancetype)dialogWithWindow:(UIWindow *)hostWindow;
- (id)initWithWindow:(UIWindow *)hostWindow;
/** @name Configuration */
- (void)resetLayout;
- (void)removeAllControls;
- (void)removeAllTextFields;
- (void)removeAllButtons;
- (void)addTextFieldWithPlaceholder:(NSString *)placeholder secure:(BOOL)secure;
- (void)addButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)sel;
- (void)addButtonWithTitle:(NSString *)title target:(id)target selector:(SEL)sel highlighted:(BOOL)flag;
/** @name Getting Values */
- (NSString *)textForTextFieldAtIndex:(NSUInteger)index;
/** @name Showing, Updating and Hiding */
- (void)showOrUpdateAnimated:(BOOL)flag;
- (void)hideAnimated:(BOOL)flag;
- (void)hideAnimated:(BOOL)flag afterDelay:(NSTimeInterval)delay;
/** @name Methods to Override */
- (void)drawRect:(CGRect)rect;
- (void)drawDialogBackgroundInRect:(CGRect)rect;
- (void)drawButtonInRect:(CGRect)rect title:(NSString *)title highlighted:(BOOL)highlighted down:(BOOL)down;
- (void)drawTitleInRect:(CGRect)rect isSubtitle:(BOOL)isSubtitle;
- (void)drawSymbolInRect:(CGRect)rect;
- (void)drawTextFieldInRect:(CGRect)rect;
- (void)drawDimmedBackgroundInRect:(CGRect)rect;
@end