Nov
21
2008
The following code will allow a user to select an image from the image library. The UIImagePickerController returns a UIImage object which is then converted to a png and stored in the documents directory for your app. You can then manipulate these images from there in any way you want. UIImagePickerControllerDelegate must be implemented for this to work.
- (IBAction) showImagePicker
{
if(imagePickerController == nil)
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
self.imagePickerController = picker;
[picker release];
}
imagePickerController.delegate = self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePickerController animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
{
NSData *imageData = UIImagePNGRepresentation(image);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filename = [documentsDirectory stringByAppendingPathComponent:@"SavedImage"];
[imageData writeToFile:filename atomically:NO];
} |
no comments
Nov
20
2008
This update includes the total images indicator. No more counting image to see if there is enough to play a game. Next up on the list of updates is button skins.
no comments | posted in My Memory
Nov
20
2008
Today I launched the mobile version of kwigbo.com. I used this great wordpress plugin called WPtouch. It would be nice if it was more customizable. I think it looks pretty sharp though.
no comments | posted in News
Nov
19
2008
My Memory Free 1.2.3 has now been added to the appStore. This update includes button opacity control and some minor bug and usability fixes.
My Memory 1.2.4 has also been added to the appStore. This update includes a total images calculator. No more counting images to see if you have enough to start playing. This is coming soon in an update for the Free version.
no comments | posted in My Memory
Nov
17
2008
I finally started on a new game for the iphone/ipod touch. The name of the game is Critter Shuffle. For this I have decided to venture into the world of cocos2d. Cocos2d is a framework for building 2-d games for the iphone OS. It is based on cocos2d for python and uses the same api. I will post about my experiences once I get a little farther along. Right now the first stage is study.
no comments | posted in Critter Shuffle
Nov
17
2008
MyMemory 1.2.4 is in review this update will show a running tally of how many image are in your playlist. This makes it easier to know when you have enough images to start playing
MyMemory Free 1.2.3 is in review as well. This update has the help screen and a few minor bug fixes. Updates for the free version will always be one step behind for now. Sorry it just kinda worked out that way.
no comments | posted in My Memory
Nov
17
2008
Hello all today I launched my new site. Here you can find all my latest ramblings about everything from code to art. You can also check out what iphone development projects I have going and follow thier progress.
no comments | posted in News