版权声明:转载请标明出处 https://blog.csdn.net/ZY_FlyWay/article/details/88824879
- Overriding non-@objc declarations from extensions is not supported 原因: 不支持从扩展中覆盖non-@objc声明 解决:将方法写到主类里
- Cannot subscript a value of type ‘[String : Any]’ with an index of type ‘UIImagePickerController.InfoKey’ 最初代码: var image:UIImage? = info[UIImagePickerControllerEditedImage] as? UIImage 修改: var image:UIImage? = info[UIImagePickerController.InfoKey.editedImage.rawValue] as? UIImage
- ‘…<’ is unavailable: Any String view index conversion can fail in Swift 4; please unwrap the optional indices 原因: 可选值进行对比 解决: 解包
- Swift4.0没有initialize方法 解决:定义一个静态方法,在app启动的时候调用。
待续。。