标签:
##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]];
标签:
原文地址:http://www.cnblogs.com/sg6548676/p/4637788.html