1、创建 contentView
RDPCustomAlertViewContentView *contentView = [RDPCustomAlertViewContentView newCustomAlertViewContentView:@"提示" message:@"这是一个全新的alertView,欢迎使用它。" buttonTitles:@"好的", @"谢谢", nil];
contentView.reslutBlock = ^(RDPAlertView * alertView, NSDictionary *additionalValues, NSInteger buttonIndex) {
NSLog(@"%@", @(buttonIndex));
};
2、创建自定义动画
RDPAlertViewCustomAnimation *alertViewAnimation = [RDPAlertViewCustomAnimation new];
3、创建一个 alertView,配置它的 contentView 和自定义动画
RDPAlertView *alertView = [RDPAlertView newRDPAlertViewWithContentView:contentView alertViewAnimation:alertViewAnimation];
3、 显示 alertView
[alertView show];
RDPAlertView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod "RDPAlertView"