Skip to content
Newer
Older
100644 54 lines (39 sloc) 2.24 KB
a7a28bc @kgn initial commit
authored Oct 26, 2012
1 //
367ca0f @kgn fixing the project name
authored Oct 30, 2012
2 // KGDiscreetAlertView.h
3 // KGDiscreetAlertView
a7a28bc @kgn initial commit
authored Oct 26, 2012
4 //
5 // Created by David Keegan on 9/11/12.
6 // Copyright (c) 2012 David Keegan. All rights reserved.
7 //
8
9 #import <UIKit/UIKit.h>
10
367ca0f @kgn fixing the project name
authored Oct 31, 2012
11 @interface KGDiscreetAlertView : UIView
a7a28bc @kgn initial commit
authored Oct 26, 2012
12
6aa5a4e @kgn Adding an option to tap to dismiss
authored Apr 23, 2013
13 @property (nonatomic) BOOL tapToHide;
14
a7a28bc @kgn initial commit
authored Oct 26, 2012
15 #pragma mark - Convenience Class Methods
16
367ca0f @kgn fixing the project name
authored Oct 31, 2012
17 // Show a discreet alert with the given text in a view,
84b32e7 @kgn Only return an alert view object if the view will be shown.
authored Oct 26, 2012
18 // the alert will be automatically dismissed after 3 seconds.
0f8992c @kgn switching to instancetype
authored Apr 18, 2013
19 + (instancetype)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view;
a7a28bc @kgn initial commit
authored Oct 26, 2012
20
367ca0f @kgn fixing the project name
authored Oct 31, 2012
21 // Show a discreet alert with the given text in a view,
a7a28bc @kgn initial commit
authored Oct 26, 2012
22 // the alert will be automatically dismissed after the specified delay.
23 // If the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called.
0f8992c @kgn switching to instancetype
authored Apr 18, 2013
24 + (instancetype)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view delay:(NSTimeInterval)delay;
a7a28bc @kgn initial commit
authored Oct 26, 2012
25
367ca0f @kgn fixing the project name
authored Oct 31, 2012
26 // Show a discreet alert with the given text in a view, and a max width for the alert.
a7a28bc @kgn initial commit
authored Oct 26, 2012
27 // The alert will be automaticly dismissed after the specified delay,
28 // if the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called.
0f8992c @kgn switching to instancetype
authored Apr 18, 2013
29 + (instancetype)showDiscreetAlertWithText:(NSString *)text inView:(UIView *)view maxWidth:(CGFloat)maxWidth delay:(NSTimeInterval)delay;
a7a28bc @kgn initial commit
authored Oct 26, 2012
30
367ca0f @kgn fixing the project name
authored Oct 31, 2012
31 // Hide all of the discreet alerts in a given view.
32 + (void)hideAllDiscreetAlertsInView:(UIView *)view;
8facd4b @kgn adding hideAllDiscreteAlertsInView
authored Oct 26, 2012
33
a7a28bc @kgn initial commit
authored Oct 26, 2012
34 #pragma mark - Instance Methods
35
367ca0f @kgn fixing the project name
authored Oct 31, 2012
36 // Show a discreet alert with the given text in a view,
84b32e7 @kgn Only return an alert view object if the view will be shown.
authored Oct 26, 2012
37 // the alert will be automatically dismissed after 3 seconds.
c399ef5 @kgn Simplify the class by automatically removing other discrete alerts wh…
authored Oct 26, 2012
38 - (void)showWithText:(NSString *)text inView:(UIView *)view;
a7a28bc @kgn initial commit
authored Oct 26, 2012
39
367ca0f @kgn fixing the project name
authored Oct 31, 2012
40 // Show a discreet alert with the given text in a view,
a7a28bc @kgn initial commit
authored Oct 26, 2012
41 // the alert will be automatically dismissed after the specified delay.
42 // If the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called.
c399ef5 @kgn Simplify the class by automatically removing other discrete alerts wh…
authored Oct 26, 2012
43 - (void)showWithText:(NSString *)text inView:(UIView *)view delay:(NSTimeInterval)delay;
a7a28bc @kgn initial commit
authored Oct 26, 2012
44
367ca0f @kgn fixing the project name
authored Oct 31, 2012
45 // Show a discreet alert with the given text in a view, and a max width for the alert.
a7a28bc @kgn initial commit
authored Oct 26, 2012
46 // The alert will be automatically dismissed after the specified delay,
47 // if the delay is 0 the alert will be 'sticky' and will not be dismissed until `hide` is called.
c399ef5 @kgn Simplify the class by automatically removing other discrete alerts wh…
authored Oct 26, 2012
48 - (void)showWithText:(NSString *)text inView:(UIView *)view maxWidth:(CGFloat)maxWidth delay:(NSTimeInterval)delay;
a7a28bc @kgn initial commit
authored Oct 26, 2012
49
367ca0f @kgn fixing the project name
authored Oct 31, 2012
50 // Dismiss the discreet alert.
a7a28bc @kgn initial commit
authored Oct 26, 2012
51 - (void)hide;
52
53 @end
Something went wrong with that request. Please try again.