xcodeのいろいろなエラー


Swiftで開発した際に出会った、いろいろなエラーについてのメモ。
(Xcode6.1を使用)

not conform to protocol

[http://note862.blogspot.jp/2014/08/swift-type-viewcontroller-does-not.html]

  • protocolを指定して、protocolで宣言したメソッドが定義されていない場合に発生。

has no initializers

[http://bribser.co.jp/blog/swift-optional-value/]

  • 変数を宣言したら、末尾に「?」か「!」を必ずつけること。

Could not insert new action connection

Interface BuilderでボタンをCtrl+ドラッグした際に発生。

  • Product > Clean でクリーンしたら解消。