swift
1public func fooa(array: inout [String], view: UIViewController) { 2 let foo = UIAlertController(title: nil, message: nil, preferredStyle: .alert) 3 let action1 = UIAlertAction(title: "アクション1", style: UIAlertActionStyle.default, handler: { 4 (action: UIAlertAction!) in 5 array += ["b"] 6 }) 7 foo.addAction(action1) 8 view.present(foo, animated: true, completion: nil) 9}
エラーメッセージ Escaping closures can only capture inout parameters explicitly by value
どのようにすればエラーメッセージを解消することができるのでしょうか
回答1件
あなたの回答
tips
プレビュー