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. ...
新版的Swift閉包做參數默認是@noescaping,不再是@escaping。所以如果函數里異步執行該閉包,要添加@escaping。否則報錯:Closure use of non-escaping parameter 'xxx' may allow it to escape. ...