-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
  • 34,719
  • 24
  • 185
  • 251
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,268
  • 14
  • 81
  • 136