我是新 iphone。在我小的應用程序,如何獲取圖像路徑從照片庫。下面的代碼獲取圖像並放在 imageview 中使用此。
-(IBAction) selectimage {UIImagePickerController*picker=[[UIImagePickerController alloc] init]; picker.delegate=self; picker.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum;[self presentModalViewController:picker animated:YES];[picker release];}-(void) imagePickerController:(UIImagePickerController*)UIPicker didFinishPickingMediaWithInfo:(NSDictionary*) info {[UIPicker dismissModalViewControllerAnimated:YES]; imageview.image=[info objectForKey:"UIImagePickerControllerOriginalImage"];NSLog("Image Path=%@",imageview.image);}
其成功放到 Imageview。但我不能得到其 imagepath。我使用的 nslog("%@",imageview.image) ;它顯示"圖像路徑 ="在控制台中。如何獲得它的路徑,以及如何從照片庫中檢索的照片。任何機構幫助我。先謝謝了。