【文件属性】:
文件名称:带输入框的提醒对话框
文件大小:232KB
文件格式:ZIP
更新时间:2021-04-04 07:07:06
IOS源码
这个源码案例实现了一个带输入框的提醒对话框,源码STAlertView,STAlertView实现带输入框的提醒对话框。可以自定义标题、消息、按钮。通过Block回调。
使用方法:
导入头文件:
#import
声明STAlertView属性变量:
@property (nonatomic, strong) STAlertView *stAlertView;
创建STAlertView对象并初始化:
[[STAlertView alloc] initWithTitle:@"Title"
message:@"Message"
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Ok"
cancelButtonBlock:^{
NSLog(@"do something at cancel");
} otherButtonBlock:^{
NSLog(@"do something at ok");
}];