UINavigation的常用问题解决方案

- (void)viewDidLoad {

    [super viewDidLoad];

    self.view.backgroundColor=[UIColor purpleColor];

    //一句话解决返回按钮的颜色,以前默认的是系统的蓝色返回按钮,在这里可以改成我们想要的颜色

    [self.navigationController.navigationBar setTintColor:[UIColor darkGrayColor]];

}


-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

    TextViewController * vc =[[ TextViewController alloc]init];

    [self.navigationController pushViewController:vc animated:YES];

}



你可能感兴趣的:(小常识)