iOSは初心者なのですが、Androidのようにボタンの背景をstateごとに分けて指定したいのですが、調べるとみんなカスタムビューを実装するか、コードで指定しててちょっと面倒です。。 Androidみたく、単にdrawableのselectorとかのxmlを書いて背景に指定すればいい、っていうくらい気楽な方法がなさそうでした。 でもIBInspectableを使って小さなカスタムビューを作ってStoryboardで指定できるようにする、っていう方法が一番しっくりきたのでメモしておきます。 元ネタ:How to change the background color of a UIButton while it's highlighted?の回答 やり方 リンク先がすごく簡単なのでやり方説明するまでもないんですが、以下のカスタムボタンを実装してstoryboardに置いたボタンに関連付ける