Skip to content

Instantly share code, notes, and snippets.

@octover
Created July 12, 2009 11:48
Show Gist options
  • Save octover/145611 to your computer and use it in GitHub Desktop.
Save octover/145611 to your computer and use it in GitHub Desktop.
iPhone System Button Image Data
// save the info system button image to where you can access it, this should be able to
// go anywhere it gets run by an iPhone program, easiest if you do it with the simulator
UIButton *info = [UIButton buttonWithType:UIButtonTypeInfoLight];
NSData *img = UIImagePNGRepresentation([info imageForState:UIControlStateNormal]);
NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"info.png"];
[img writeToFile:path atomically:NO];
NSLog(@"%@", path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment