花费 26 ms
Closure use of non-escaping parameter 'xxx' may allow it to escape

新版的Swift闭包做参数默认是@noescaping,不再是@escaping。所以如果函数里异步执行该闭包,要添加@escaping。否则报错:Closure use of non-escaping parameter 'xxx' may allow it to escape. ...

Thu Feb 21 19:39:00 CST 2019 0 1712

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM