1.隐藏返回键的按钮
[self.navigationController.navigationItem setHidesBackButton:YES];
[self.navigationItem setHidesBackButton:YES];
[self.navigationController.navigationBar.backItem setHidesBackButton:YES];
2.设置系统右边的按钮
UIButton * butCancel = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
[butCancel setTitle:@"取消" forState:UIControlStateNormal];
[butCancel setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[butCancel addTarget:self action:@selector(clickCancelBut) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:butCancel];













网友评论