Initial commit
This commit is contained in:
14
Model/AAAlertInfo.h
Normal file
14
Model/AAAlertInfo.h
Normal file
@@ -0,0 +1,14 @@
|
||||
@interface AAAlertInfo: NSObject
|
||||
|
||||
@property (nonatomic, retain) NSArray<NSString *> *actions;
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
@property (nonatomic, copy) NSString *message;
|
||||
@property (nonatomic, retain) NSArray<NSString *> *textFieldValues;
|
||||
@property (nonatomic, assign) NSInteger selectedAction;
|
||||
@property (nonatomic, retain) NSMutableDictionary<NSString *, NSNumber *> *customAppActions;
|
||||
@property (nonatomic, copy) NSString *bundleID;
|
||||
@property (nonatomic, copy) NSString *identifier;
|
||||
|
||||
-(id)initWithActions:(NSArray<NSString *> *)actions title:(NSString *)title message:(NSString *)message textFieldValues:(NSArray<NSString *> *)textFieldValues selectedAction:(int)selectedAction customAppActions:(NSMutableDictionary<NSString *, NSNumber *> *)customAppActions bundleID:(NSString *)bundleID;
|
||||
|
||||
@end
|
||||
39
Model/AAAlertInfo.m
Normal file
39
Model/AAAlertInfo.m
Normal file
@@ -0,0 +1,39 @@
|
||||
#import "AAAlertInfo.h"
|
||||
|
||||
@implementation AAAlertInfo
|
||||
|
||||
-(id)initWithActions:(NSArray<NSString *> *)actions title:(NSString *)title message:(NSString *)message textFieldValues:(NSArray<NSString *> *)textFieldValues selectedAction:(int)selectedAction customAppActions:(NSMutableDictionary<NSString *, NSNumber *> *)customAppActions bundleID:(NSString *)bundleID {
|
||||
if (self = [super init]) {
|
||||
self.actions = actions;
|
||||
self.title = title;
|
||||
self.message = message;
|
||||
self.textFieldValues = textFieldValues;
|
||||
self.selectedAction = selectedAction;
|
||||
self.customAppActions = customAppActions;
|
||||
self.bundleID = bundleID;
|
||||
|
||||
NSMutableString *actionsString = [NSMutableString string];
|
||||
|
||||
for (NSString *value in self.actions) {
|
||||
[actionsString appendString:value];
|
||||
}
|
||||
|
||||
self.identifier = [NSString stringWithFormat:@"%@%@%@t_%ia_%i_%@", self.title, self.message, actionsString, (int)self.textFieldValues.count, (int)self.actions.count, self.bundleID];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc {
|
||||
self.actions = nil;
|
||||
self.title = nil;
|
||||
self.message = nil;
|
||||
self.textFieldValues = nil;
|
||||
self.customAppActions = nil;
|
||||
self.bundleID = nil;
|
||||
self.identifier = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user