source:http://stackoverflow.com/questions/18870128/ios-7-navigation-bar-custom-back-button-without-title
It’s actually pretty easy, here is what I do:
1 2 3 4 5 6 | // Set this in every view controller so that the back button displays back instead of the root view controller name self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil]; //now do push //这里再push新的VC |
Put this line in the view controller that is pushing on to the stack. The newly pushed view controller back button will now show whatever you put for initWithTitle, which in this case is an empty string.
关键点:这句要放在做push的VC中(旧的VC中),而不是即将出现的VC(新的VC)中
原理应该是:新VC的后退按钮文字 是 旧VC的一个属性
楼主的博客真是好,已经收藏,随便问一句,博主的的主题能开放下载吗?我点击进去居然是要购买的-__-.
http://catchthemes.com/themes/catch-everest/ 这里可以免费下载,似乎是首页会强烈建议你买pro版本,其实是有免费版的