今天封装afnet的时候遇到这个问题:Cannot convert value of type '(URLSessionDataTask, Error) -> Void' to expected argument type '((URLSessionDataTask?, Error) -> Void)?'
0图片.png
大概意思就是我写的这个闭包和afnet的类型不同
1图片.png
研究之后改成这样(加了个问号)
图片.png
今天封装afnet的时候遇到这个问题:Cannot convert value of type '(URLSessionDataTask, Error) -> Void' to expected argument type '((URLSessionDataTask?, Error) -> Void)?'
大概意思就是我写的这个闭包和afnet的类型不同
研究之后改成这样(加了个问号)