为handleSubmitController类提供简单创建和显示UIAlertController的类别。
非常简单,哈哈哈。
[self hrShowActionSheetWithTitle:@"Title" message:@"Message" buttonTitles:@[@"First", @"Second"] actionHandler:^(NSInteger indexOfAction, NSString * _Nonnull title) {
[self showHandleAlertWithMessage:[NSString stringWithFormat:@"Tapped button with name: '%@'", title]];
} andCancelActionHandler:^{
[self showHandleAlertWithMessage:@"Cancel button is tapped"];
}];
-(void)showHandleAlertWithMessage:(NSString *)message {
[self hrShowAlertWithTitle:@"Handle!" message:message];
}
有关其他方法的用法,请参阅文档。
Objective-C和iOS 8.0或更高版本。
AlertPro通过CocoaPods提供。要安装它,只需将以下行添加到您的Podfile中
pod 'AlertPro'
Ivan Shevelev, [email protected]
AlertPro可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。