この記事は画像がたくさんだったりしてすごく長いです。 SwiftでiOS開発の勉強をしている会社の新人と話をしているときに実装中のコードを見せてもらうと気になる実装があった。 let action = UIAlertAction(title: "title", style: .default, handler: { (action: UIAlertAction!) in ... }) UIAlertActionのイベントハンドラになるクロージャの引数の型が違う。 このイニシャライザのメソッド定義はこちら。 open class UIAlertAction : NSObject, NSCopying { public convenience init(title: String?, style: UIAlertActionStyle, handler: ((UIAlertAction) ->