0
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 5 years have passed since last update.

XcodeでUI部品とコントロールが紐付けできないときの対処

0
Last updated at Posted at 2015-11-20

XcodeでObj-cのコードとUIを紐付けしたいとき、

アシスタントエディタでコードを開いて関連付けたいUI部品をCtrl押しながらコード側に持っていくと自動でメソッドやらプロパティが生成される

的な記載を本で見たけど、Storyboardファイルを消したり作ってたりautolayoutでこんがらがってたらなぜかできなくなった。

結論としてはCustomClassを設定したらなおった。
UIはどこに何があるか把握しきれていないので、Storyboardをソースコード版で開いて、<viewController>の要素にcustomClass="ViewController"を入れて対応。

しかし、やっぱり時代はSwiftですかねぇ……。

0
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
0
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?