Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract UIBarButtonItem Icons from the iPhone SDK?

Tags:

iphone

I'd like to extract the default UIBarButtonItem icons from the iPhone SDK. I imagine they're probably stored in the iPhoneSimulator platform as alpha-channel-only PNGs, but I've yet to find it.

The one I'm looking for is UIBarButtonSystemItemReply. (For those suspicious that there's even a valid use case for this, I'm looking to use this on a table row header where the user can post replies, row-wise)

like image 344
Justin Searls Avatar asked May 24 '09 22:05

Justin Searls


3 Answers

To copy all iPhone (or MacOS) system icons go to directory:

cd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/ 

=> there might be more than one iPhoneSimulator version (iPhoneSimulator4.3.sdk), just choose the one you prefer. And than execute following command:

find . -iname "*.png*" -print0 | xargs -I{} -0 cp -v {} /tmp/iPhoneIcons/

/tmp/iPhoneIcons/ => is the destination directory

like image 106
driggi2 Avatar answered Oct 26 '22 01:10

driggi2


The Other.artwork file is in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/ (you need the SDK).

Use the "iPhoneShop-1.3.jar" program -- available currently here to extract all of the images into a directory.

java -jar iPhoneShop-1.3.jar ARTWORK Other.artwork EXPORT Other
like image 21
Simon Woodside Avatar answered Oct 25 '22 23:10

Simon Woodside


I don't know how to do this, however I was curious about the same thing a few months ago. You may be able to initialize this UIBarButtonItem and extract the image from it by looping through all of the elements in its UIView and dumping the NSImages. I'm not sure exactly how to go about doing that, but I remember Erica Sadun wrote an article about it regarding using a full-screen camera image. I'm not allowed to add a link to it, so just Google for "erica sadun full screen camera".

like image 30
AriX Avatar answered Oct 26 '22 00:10

AriX