问题
I'm working on updating an old app that uses UIButtons that are meant to mimic a navigation bar's back button in appearance. I'd like to use the default chevron image that's used for back buttons in iOS 7.
Is this image available somewhere in the iOS 7 SDK or elsewhere so I can use it as a UIButton's image via setImage:forState:
?
回答1:
If you need to extract image from iOS, this is the best tool:
iOS-Artwork-Extractor.
I think you would be able to extract chevron image with it.
回答2:
It's not available through any published, Apple authorized API. Some options available to you are:
- See if somebody else has extracted the artwork files and provides instructions or tools for you to do so yourself.
- Take a screenshot of the UI element, then use that yourself.
- Write code to draw it yourself; in the case of the back button chevron, it is a fairly simple image (two lines, a few pixels think, rounded caps) and wouldn't be hard to reproduce with a few Core Graphics calls.
来源:https://stackoverflow.com/questions/19866414/where-can-i-find-the-default-back-button-chevron-image-for-ios-7