-3

Possible Duplicate:
Save An Image To Application Documents Folder From UIView On IOS

I want to store image in my apps folder programmatically which I taken by UIImagePiker (camera or photogallery). I am a beginner in iOS programming.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Lutful Kabir
  • 119
  • 6

1 Answers1

1

Saving an image:

-(void)saveImage:(UIImage*)image
{
    NSString  *imagePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/aName.png"];

   [UIImagePNGRepresentation(image) writeToFile:imagePath atomically:YES];

}
Maulik
  • 19,348
  • 14
  • 82
  • 137