在导航控制器中使用默认后退按钮 [英] Use default back button in navigation controller
问题描述
我不知道如何让导航控制器使用默认的 <
按钮.我知道如何添加后退按钮的唯一方法是添加一个 Bar Button Item
但我必须自己提供图像.我想使用默认的系统后退符号,这种符号与 show/push segue 一起显示.这可能吗?
I don't know how to make a navigation controller use the default <
button. The only way I know how to add a back button at all is to add a Bar Button Item
but there I have to provide the image myself. I want to use the default system back symbol, the kind that shows up with show/push segue. Is this possible?
推荐答案
我猜你在谈论以模态方式呈现视图控制器时这样做.你不能添加 get <就像你在 push segue 中所做的那样,因为 Apple 决定不内置它(据我所知).最好的办法是创建一个带有文本<"的左栏按钮项或创建您自己的后退按钮并将其设置为该图像,以使您的应用程序具有一些独特性!
I'm guessing you're talking about doing this when presenting a view controller modally. You can't add get the < as you would in a push segue because Apple decided to just not build it in (as far as I know). Your best bet is to create a left bar button item with the text "<" or create your own back button and set it to that image to give your app some uniqueness!
这篇关于在导航控制器中使用默认后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!