iOS7和8去掉navigation bar中的后退按钮文字的完美方法 | iOS 7&iOS8 navigation bar custom back button without title

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:

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的一个属性

2 Replies to “iOS7和8去掉navigation bar中的后退按钮文字的完美方法 | iOS 7&iOS8 navigation bar custom back button without title”

  1. 求主题

    楼主的博客真是好,已经收藏,随便问一句,博主的的主题能开放下载吗?我点击进去居然是要购买的-__-.

    评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注