我在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