图像选择器委托没有在Xcode 7中编译。它仍然在Xcode 6.4中进行编译。
我有Xcode版本7.0 beta 3(7A152u)
有没有新的方法在Xcode 7中声明该功能?这就是我在代码中使用它的方式:
class ViewController: UIViewController, UITableViewDataSource,
UITableViewDelegate, UIImagePickerControllerDelegate,
UINavigationControllerDelegate {
func imagePickerController(
picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
}
}
答案 0 :(得分:3)
尝试:
func imagePickerController(
picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [String : AnyObject]) {
// code
}