DSDAlertManager 1.0.3

DSDAlertManager 1.0.3

测试测试
Lang语言 Obj-CObjective C
许可 MIT
发布最后发布2016年11月

dsdsk 维护。



  • dsdsk

DSDAlertManager 旨在简化 iOS 的对话框显示。

要求

  • iOS 8.0+

示例

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

安装

DSDAlertManager 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "DSDAlertManager"

用法

仅 OK 按钮

[DSDAlertManager showAlert:self
                     title:@"title"
                   message:@"message"
                        ok:^{
                            NSLog(@"OK tap!");
                        }];

OK 和 Cancel 按钮

[DSDAlertManager showAlert:self
                     title:@"title"
                   message:@"message"
                        ok:^{
                            NSLog(@"OK tap!");
                        }
                    cancel:^{
                        NSLog(@"Cancel tap!");
                    }];

YES 和 NO 按钮

[DSDAlertManager showAlert:self
                     title:@"title"
                   message:@"message"
                       yes:^{
                           NSLog(@"YES tap!");
                       }
                        no:^{
                            NSLog(@"NO tap!");
                        }];

YES 和 NO 按钮(自定义按钮标签)

[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 文件。