导航控制器UINavigationCotroller的常用方法汇总




 

 

 

 

//设置导航标题

    self.title = @"首页";

//设置导航控制条颜色

    self.navigationController.navigationBar.tintColor = [UIColor grayColor];


 



 
//设置为左边按钮

[[self navigationItem] setLeftBarButtonItem:backButton];


 //将当前视图推出栈,程序将进入上一视图

    [self.navigationController popViewControllerAnimated:YES];

 //直接进入根视图

    [self.navigationController popToRootViewControllerAnimated:YES];


 


 

猜你喜欢

转载自andli.iteye.com/blog/1610201