alertController和UIAlertView 使用示例
来源:互联网 发布:少林足球 知乎 编辑:程序博客网 时间:2024/05/28 04:53
-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
NSLog(@"Application did receive local notifications");
// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:@"这个是UIAlertController的默认样式" preferredStyle:UIAlertControllerStyleAlert];
//
// UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
// UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"好的" style:UIAlertActionStyleDefault handler:nil];
// [alertController addAction:cancelAction];
// [alertController addAction:okAction];
//
// [self presentViewController:alertController animated:YES completion:nil];
// notification.alertBody = _titleCell.editTextField.text;
// notification.alertAction = _titleCell.editTextField.text;
// NSLog(@"BODY IS %@",notification.alertBody);
UIAlertView *alertView = [[UIAlertViewalloc] initWithTitle:@"通知"message:notification.alertBody delegate:selfcancelButtonTitle:@"Cancel"otherButtonTitles:@"Sure",nil];
[alertView show];
// [application cancelAllLocalNotifications];
//
// [self cancelLocalNotificationWithKey:@"schedule"];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
}
- alertController和UIAlertView 使用示例
- iOS:AlerView、ActionSheet和AlertController的简单使用
- alertController
- AlertController
- UIAlertController 和 UIAlertView的使用
- UIAlertView和UIAlertController的使用
- IOS手动编写界面----UIAlertView的详细使用示例
- UIAlertView提示控件和UIActionSheet的使用
- UIAlertView使用
- UIAlertView使用
- UIAlertView 使用
- 使用UIAlertView
- UIAlertView使用
- UIAlertView使用
- 使用AlertController出现:Warning: Attempt to present <UIAlertController: 0x7a961600>
- 使用UIAlertView和UITableView来创建一个有用的UIAlertTableView
- iOS学习笔记—— UIAlertView 和 UIActionSheet 的使用
- ios学习笔记:UIAlertView使用和监听点击事件
- JVM--内存调优
- ThreadLocal(1)
- c++ 删除空格的函数
- hrbust 2162 哈理工oj 2162 【分形图、搜索】
- andbase学习笔记六
- alertController和UIAlertView 使用示例
- 【EJB基础】Message Driven Bean
- java.io.EOFException
- dicom协议研究之echo流程分析
- 【LeetCode】.1.Two Sum
- mysql优化-- int类型解析及其优化
- Android View事件机制 21问21答
- 5本最佳的Java面向对象理论和设计模式的书籍
- js时间戳和日期时间格式的互转