gpt4 book ai didi

swift - imagePickerController(_ :didFinishPickingMediaWithInfo:) Xcode 7 Swift Error

转载 作者:行者123 更新时间:2023-11-28 11:16:19 24 4
gpt4 key购买 nike

图像选择器委托(delegate)未在 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]) {

}

}

最佳答案

尝试:

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

关于swift - imagePickerController(_ :didFinishPickingMediaWithInfo:) Xcode 7 Swift Error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31564953/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com