Skip to content

Instantly share code, notes, and snippets.

@codesburner
Forked from octover/gist:145611
Created April 4, 2011 10:35
Show Gist options
  • Save codesburner/901452 to your computer and use it in GitHub Desktop.
Save codesburner/901452 to your computer and use it in GitHub Desktop.
// 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