I need to add a left bar button item in my app that looks like system back button, but is not the system back button, since it will appear on view controller that is the only vc of my navController's stack and execute my own code. Simply writing "Back" isn't really good for me, as I need to display the "<" arrow as well. Is there a way to programmatically create an arrow like that, without making image with that arrow?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Try this:
If addSubview gives you trouble, try
Look at the
UIBarButtonSystemItem
enum under contants in the UIBarButtonItem documentation:https://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIBarButtonItem_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40007519-CH3-SW2
These are all of the button styles provided by Apple:
Perhaps rewind or undo would be close enough for you.
Consider using a dummy
UIViewController
as a root view controller for yourUINavigationController
’s stack:Then you can use my BackButtonHandler extension to handle back button action (as described in this thread) :
You can use any Unicode character (anywhere in your code) for this.
You can find what you want here:
Search for
arrow
orback
or browse the categories.Then copy paste the character where required (in the XIB object's title or in the
setTitle
orsetText
methods like any other character)something like: