标签:style io ar color 使用 sp on art cti
typedef enum{
alertviewType1,
alertviewType2,
} alertviewType;
@interface ZBMainViewController ()<UIAlertViewDelegate>
@end
@implementation ZBMainViewController
- (void)viewDidLoad
{
[super viewDidLoad];
//导航栏是否透明 no是透明
[self.navigationController.navigationBar setTranslucent:NO];
self.navigationItem.title = @"张先森"; // self.title=@"张先森";
[self.navigationController.navigationBar setBarTintColor:[UIColor purpleColor]];
[self.navigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"测试" style:UIBarButtonItemStyleDone target:self action:@selector(leftClick:)]];
}
-(void)leftClick:(UIBarButtonItem *)item{
UIAlertView *view=[[UIAlertView alloc] initWithTitle:@"测试" message:@"你大爷" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"yes", nil];
view.tag=alertviewType1;
[view show];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (alertView.tag==alertviewType1) {
if (buttonIndex==0) {
}
}
}
标签:style io ar color 使用 sp on art cti
原文地址:http://www.cnblogs.com/zhibin/p/4114554.html