花費 5 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