forked from dogo/SCLAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCLAlertViewResponder.m
More file actions
45 lines (34 loc) · 863 Bytes
/
SCLAlertViewResponder.m
File metadata and controls
45 lines (34 loc) · 863 Bytes
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
//
// SCLAlertViewResponder.m
// SCLAlertView
//
// Created by Diogo Autilio on 9/26/14.
// Copyright (c) 2014-2017 AnyKey Entertainment. All rights reserved.
//
#import "SCLAlertViewResponder.h"
@interface SCLAlertViewResponder ()
@property SCLAlertView *alertview;
@end
@implementation SCLAlertViewResponder
//
//// Allow alerts to be closed/renamed in a chainable manner
//// Example: SCLAlertView().showSuccess(self, title: "Test", subTitle: "Value").close()
// Initialisation and Title/Subtitle/Close functions
- (instancetype)init:(SCLAlertView *)alertview
{
self.alertview = alertview;
return self;
}
- (void)setTitletitle:(NSString *)title
{
self.alertview.labelTitle.text = title;
}
- (void)setSubTitle:(NSString *)subTitle
{
self.alertview.viewText.text = subTitle;
}
- (void)close
{
[self.alertview hideView];
}
@end