我在iPhone应用程序中从照片库中选择图像。我将如何检索实际的图像名称。我怎样才能得到通过iPhone中的照片库采摘的图像的名称?
在.H类
UIImageView * imageView;
UIButton * choosePhotoBtn;
中的m级
-(IBAction) getPhoto:(id) sender
{
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
if((UIButton *) sender == choosePhotoBtn)
{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
else
{
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[picker dismissModalViewControllerAnimated:YES];
imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
我如何获得图像的实际名称?
我新的iphone。请帮帮我。
在此先感谢。
看到此链接 http://stackoverflow.com/questions/5864814/uiimagepickercontroller-get-the-name-of-the -image-selected-from-photo-library – PRASAD1240 2013-03-29 09:08:33
http://stackoverflow.com/questions/5864814/uiimagepickercontroller-get-the-name-of-the-image-selected-from-photo-library – PRASAD1240 2013-03-29 09:47:01
@ PRASAD1240你为什么要发布问题后面提问的链接?请至少检查问题日期。 – 2016-10-19 08:01:39