2015年4月18日土曜日

【Swift】overriding method with selector has incompatible type

久々にアプリ作ろうとしたら、コンパイルエラーになってしまった。
オーバーライドしたtouchesBeganイベントの引数が違うようで・・・
 以下のように 対処法しました

override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
    //anycode
}

    
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
    //anycode
}

0 件のコメント:

コメントを投稿