LoginSignup
6
6

More than 5 years have passed since last update.

Could not insert new outlet connectionエラーへの対処

Posted at

UIStackViewのIBOutletを追加するためにstoryboardから.swiftファイルのdistributionButtonとallignmentPickerViewの宣言の間にドラッグしたところ、以下のようなエラーが出ました。

Could not insert new outlet connection: Could not find any information 
for the class named allignmentPickerView

error.gif

Could not insert new outlet connectionでググると以下の資料が出てきました。

ただ今回の場合はもう一度よくエラー文を見ると、ドラッグした部分のすぐ下に宣言したallignmentPickerViewという文字列が含まれていることに気づきます。

まさかと思いdistributionButtonとallignmentPickerViewの間に1行空行を入れて、空行めがけて再度ドラッグしたら無事IBOutlet作成できました。行間を狙ってドラッグしたつもりが、既存の宣言の上にドラッグしたことになっていたようです。

6
6
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
6
6