forked from LuciusLu/TopAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewController.m
More file actions
51 lines (37 loc) · 1.12 KB
/
ViewController.m
File metadata and controls
51 lines (37 loc) · 1.12 KB
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
//
// ViewController.m
// TopAlertViewDemo
//
// Created by LuLucius on 15-2-13.
// Copyright (c) 2015年 MOZ. All rights reserved.
//
#import "ViewController.h"
#import "MozTopAlertView.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (IBAction)btn1Action:(id)sender {
[MozTopAlertView showWithType:MozAlertTypeInfo text:@"Info" parentView:self.view];
}
- (IBAction)btn2Action:(id)sender {
MozTopAlertView *alertView = [MozTopAlertView showWithType:MozAlertTypeSuccess text:@"Success" parentView:self.view];
alertView.dismissBlock = ^(){
NSLog(@"dismissBlock");
};
}
- (IBAction)btn3Action:(id)sender {
[MozTopAlertView showWithType:MozAlertTypeWarning text:@"Warning" doText:@"undo" doBlock:^{
} parentView:self.view];
}
- (IBAction)btn4Action:(id)sender {
[MozTopAlertView showWithType:MozAlertTypeError text:@"Error" doText:@"undo" doBlock:^{
} parentView:self.view];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end