-
Notifications
You must be signed in to change notification settings - Fork 10
/
AWNotification.h
56 lines (41 loc) · 1.37 KB
/
AWNotification.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
//
// AWNotification.h
// RoundedNotification
//
// Created by Alex Wiltschko on 8/22/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
#define kDefaultWidthRoundedCenterLarge 250.0
#define kDefaultHeightRoundedCenterLarge 250.0
#define kDefaultWidthRoundedThin 200.0f
#define kDefaultHeightRoundedThin 40.0
#define kFontSizePill 16
#define kFontSizeRoundedRect 20
#define kFontSizeFullScreen 18
#define kDefaultFont @"Helvetica Neue"
CGRect CGRectMakeCentered(CGRect containingRect, float width, float height);
typedef enum {
AWNotificationStyleFullScreen,
AWNotificationStyleRoundedRect,
AWNotificationStylePill
} AWNotificationStyle;
@interface AWNotification : UIView {
NSString *message;
UILabel *messageLabel;
UIActivityIndicatorView *spinner;
AWNotificationStyle style;
UIFont *font;
BOOL willNeedToTurnOffOrientationNotifications;
}
@property (nonatomic, retain, setter=setMessage:) NSString *message;
- (void)setMessage;
- (id)initWithNotificationStyle:(AWNotificationStyle)style;
- (void)show;
- (void)hide;
- (void)hideWithMessage:(NSString *)finalMessage; // use if you want to display a goodbye message, like "Success!" or "Upload complete!"
- (void)hideWithSuccessMessage:(NSString *)finalMessage;
- (void)hideWithFailureMessage:(NSString *)finalMessage;
- (void)rotate;
@end