LoginSignup
8
8

More than 5 years have passed since last update.

Type "xxx" does not confirm to protocol 'NSObjectProtocol'エラーが出る場合の対処法

Posted at

実行環境

環境 バージョン
Mac 10.11.6
Xcode 8.0
Swift 3.0

発生した現象

下記のようにクラスにデリゲートを設定した時に「Type "xxx" does not confirm to protocol 'NSObjectProtocol'」というエラーが発生。

class xxx: testDelegate {
}

対応方法

NSObjectを追加する

class xxx: NSObject, testDelegate {
}

参考サイト

*stack overflow: Swift : Type CCC doesnt conform to protocol 'NSObjectProtocol'

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8