DSDAlertManager 旨在简化 iOS 的对话框显示。
要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install
DSDAlertManager 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "DSDAlertManager"
[DSDAlertManager showAlert:self
title:@"title"
message:@"message"
ok:^{
NSLog(@"OK tap!");
}];
[DSDAlertManager showAlert:self
title:@"title"
message:@"message"
ok:^{
NSLog(@"OK tap!");
}
cancel:^{
NSLog(@"Cancel tap!");
}];
[DSDAlertManager showAlert:self
title:@"title"
message:@"message"
yes:^{
NSLog(@"YES tap!");
}
no:^{
NSLog(@"NO tap!");
}];
[DSDAlertManager showAlert:self
title:@"title"
message:@"message"
yesLabel:@"CustomYES"
yes:^{
NSLog(@"YES tap!");
}
noLabel:@"CustomNO"
no:^{
NSLog(@"NO tap!");
}];
[DSDAlertManager showEditAlert:self
title:@"title"
message:@"message"
value:_dataSources[4].value
ok:^(NSString *value) {
NSLog(@"OK(%@) tap!", value);
}
cancel:^{
NSLog(@"Cancel tap!");
}];
dsdsk
DSDAlertManager 在 MIT 许可与下可用。有关更多信息,请参阅 LICENSE 文件。