gpt4 book ai didi

ios - Swift3 警告 imagePickerController 几乎匹配

转载 作者:行者123 更新时间:2023-12-02 08:34:34 25 4
gpt4 key购买 nike

从旧版本的 swift 转换时,我收到警告

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

警告是

Instance method 'imagePickerController(:didFinishPickingMediaWithInfo:)' nearly matches optional requirement 'imagePickerController(:didFinishPickingMediaWithInfo:)' of protocol UIImagePickerControllerDelegae

这里的问题是,就我的眼睛来看,它提示的内容和它所说的几乎匹配的内容是 100% 相同的。我该如何解决这个警告?

最佳答案

在较新的 swift 版本中,方法应该是

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])

然后,警告不会出现。

关于ios - Swift3 警告 imagePickerController 几乎匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42660668/

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