导航返回按钮的事件处理
2017-02-16 16:59
190 查看
导航返回按钮的事件处理
-(void)navigationShouldPopOnBackButtonSelect ///在这个方法里写返回按钮的事件处理
{
[self showAlertView:@"当前有未保存的数据,确认返回?" antagAler:100];
}
-(void)alertAction:(NSString *)titleStr
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:titleStr message:nil preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}] ];
[self presentViewController:alert animated:YES completion:nil];
}
-(void)navigationShouldPopOnBackButtonSelect ///在这个方法里写返回按钮的事件处理
{
[self showAlertView:@"当前有未保存的数据,确认返回?" antagAler:100];
}
-(void)alertAction:(NSString *)titleStr
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:titleStr message:nil preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}] ];
[self presentViewController:alert animated:YES completion:nil];
}
相关文章推荐
- Android ActionBar Home按钮返回事件处理的两种方式
- 截获导航控制器系统返回按钮的点击pop及右滑pop事件
- Android ActionBar Home按钮返回事件处理的两种方式:
- sencha touch中处理Android返回按钮事件
- Ionic2 下处理 Android 设备下返回按钮的事件
- 返回按钮事件代码 收藏
- Tapestry5 事件处理函数返回结果处理策略
- 转: (论坛答疑点滴)winform下怎么得到按钮的click事件的处理方法
- 加载页面或返回到页面时不触发 onload 事件处理程序
- 下面的示例演示如何使用传递到事件处理方法的 GridViewCommandEventArgs 对象确定引发事件的按钮的命令名。
- vc中处理按钮的UP和DOWN事件
- 用CSS制作可交换带事件处理的图片按钮
- 空格键和enter键的事件处理(页面存在多个按钮,登陆按钮不是页面的第一个按钮)
- Repeater嵌套使用及按钮事件处理
- input按钮的事件处理大全
- datagridview 单击特定单元格触发事件 单击按钮列触发事件 (处理点击header触发事件异常)
- input按钮的事件处理大全
- .NET WinForms中点击窗体右上角的关闭按钮后的事件处理
- html和javascript中按钮事件处理的不同
- 按钮按下事件的处理