1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

カスタムセルのAutoLayoutができない!!「this class is not key value coding-compliant for the key」の対処法

Posted at

はじめに

カスタムセルのAutoLayoutが正しく反映されず、苦戦したので記事に残します。

発生している問題

カスタムセルのAutoLayoutがいくらやっても効かず、中のUI部品がどうしてもセルの左上に配置されてしまいます。

解決策

カスタムセルのストーリーボード上にある”ContentView”をクリック

右側のCastomClassが設定されている場合、空欄にする。

すると、UIViewという文字が薄く表示されデフォルトのUIViewが設定される。

これでAutoLayoutが反映されるようになります!

それでも、「this class is not key value coding-compliant for the key」とエラーが出る場合

関連付けが二重にされている可能性があります。
UI部品を選択し、ContentViewとの関連付けを消去しましょう。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?