码迷,mamicode.com
首页 > 其他好文 > 详细

UIAlertView和UIActionSheet

时间:2015-07-11 00:55:59      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:

##UIAlertView和UIActionSheet

```objc
// cancelButton buttonIndex == 1
// destructiveButton buttonIndex ==0
UIActionSheet *sheet =[[UIActionSheet alloc]initWithTitle:@"确定注销吗" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"注销" otherButtonTitles:nil, nil];

[sheet showInView:self.view];

```
```objc
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex

{
if (buttonIndex == 0) {
[self.navigationController popViewControllerAnimated:YES];
}

}
```

/* * 清空导航条背景图片,系统判断当前为NIL,但还是会再生成一张背景图片 */
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc]init] forBarMetrics:UIBarMetricsDefault];

/* * 去掉分割线 */
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc]init]];

UIAlertView和UIActionSheet

标签:

原文地址:http://www.cnblogs.com/sg6548676/p/4637788.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!