2016-08-11 53 views
-3

我工作的這個應用程序開發教程:使用的未解決的標識符「信息」蘋果教程

https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson4.html#//apple_ref/doc/uid/TP40015214-CH6-SW1

,我起身到您使用信息詞典(朝的結尾部分教程),但我得到錯誤「使用未解析的標識符'信息'」。我複製並粘貼他們提供的代碼:

//The info dictionary contains multiple representations of the image, 
//and this uses the original. 
let selectedImage = info[UIImagePickerControllerOriginalImage] as! UIImage 

但它不會工作

回答

0

的代碼應該被放置在該方法中:

func imagePickerController(picker: UIImagePickerController, 
          didFinishPickingMediaWithInfo info: [String : AnyObject]) { 
} 

info是參數到的一個功能。

相關問題