I am trying to the photo and video file path and storing into the sqlite. I am getting photo like this but I want know how i get the file path And store that into the sqlite And the same thing is i need with video alsoIs that possible to do that or is that any other idea or hints to solve that
-(IBAction) getPhoto:(id) sender {
UIImagePickerController * UIPicker = [[UIImagePickerController alloc] init];
UIPicker.delegate = self;
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
{
UIPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:UIPicker animated:YES];
}
else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Error" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
[alert show];
[alert release];
}
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
I thing people will help me out Thanks in advance