iOS开发中,navigation的返回按钮是英文“back”,想修改成中文“返回”或者自定义的文字;这么简单的事情却折腾了小半个小时。原来是被leftBarButtonItem和rightBarButtonItem的设置方法给迷惑了。 [self.navigationControllerpushViewController:photoController animated:YES]; 之前执行;代码如下: self.navigationItem.backBarButtonItem=[[UIBarButtonItemalloc] initWithTitle:@”返回“style:UIBarButtonItemStyleBorderedtarget:nilaction:nil]; [self.navigationControllerpushViewController:photoController animated:YES]; 赶快试试吧! |
|