保留图标,从“后退”按钮中删除文本 [英] Remove text from Back button keeping the icon

查看:126
本文介绍了保留图标,从“后退”按钮中删除文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从后退按钮中删除文本,但我想保留图标。我试过了

I want to remove the text from the back button, but I want to keep the icon. I have tried

let backButton = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.Plain, target: navigationController, action: nil)
navigationItem.leftBarButtonItem = backButton

但是,这会完全删除文本和图标。

However, this removes completely the text and the icon.

推荐答案

@ rmd2的方法几乎是正确的,但你应该选择控制器的导航栏,后退按钮会指向并在后退按钮字段中键入

The method of @rmd2 is almost right, but instead you should select the navigation bar of the controller to which back button will point to and type " " in the Back Button field.

这篇关于保留图标,从“后退”按钮中删除文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆