iOS UIAlertController
2016-06-20 08:35
393 查看
//UIAlertController
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
// Create the actions.
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
RegisterViewController *registerVC = [[RegisterViewController alloc]init];
[self.navigationController pushViewController:registerVC animated:YES];
}];
// Add the actions.
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
// Create the actions.
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
}];
UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
RegisterViewController *registerVC = [[RegisterViewController alloc]init];
[self.navigationController pushViewController:registerVC animated:YES];
}];
// Add the actions.
[alertController addAction:cancelAction];
[alertController addAction:otherAction];
[self presentViewController:alertController animated:YES completion:nil];
相关文章推荐
- Android开发框架xUtils3.x新手教学(三)使用注解绑定UI、资源和事件
- iOS Base64图片与UIImage的相互转化
- Permutation Sequence
- Android UI设计之<十一>自定义ViewGroup,打造通用的关闭键盘小控件ImeObserverLayout
- QT 判断当前焦点是否在某控件上(使用hasFocus函数,毕竟QT是DIRECTUI,所以这个Focus到底代表了什么呢?)
- Qt多线程编程总结(一)(所有GUI对象都是线程不安全的)
- PHP中的$_REQUEST
- 使用mingw编译并可以以最高权限运行程序
- 回归基础系列-call by value / call by reference区别与实例
- Google Bookmarks API Guide
- UUID.java-J2ME 中javax.bluetooth里的UUID生成类
- easyui扩展tabs
- 【Android进阶】SpannableString与SpannableStringBuilder使用
- 如何实现一个UI系统
- 如何实现一个UI系统
- 如何实现一个UI系统
- 如何实现一个UI系统
- UITabBarController和UINavigationController的区别
- wtl_duilib 0.3附带 Demo 聊天对话框
- wtl_duilib中实现子窗口拖动