[英]Swift - Closure cannot have keyword arguments Error In Xcode 7.3
自Swift 2.2(隨Xcode 7.3提供)以來,聲明如下:
button.selectionHandler = { (CNPPopupButton button) -> Void in
應該
button.selectionHandler = { (button : CNPPopupButton) -> Void in
確實感覺更像Swift-ish。 如果您不想確定類型,也可以使用簡寫語法:
button.selectionHandler = { button in
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.