カスタムクラスを定義 カスタムクラスの作成時Subclass ofをUIButtonに変更し作成を行う。 ここでは作成するカスタムクラスをColorBkgButtonとする。 #import "ColorBkgButton.h" @implementation ColorBkgButton //デフォルトで出来るファイル - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } //背景とタイトルの編集が出来るようにする - (id)initWithFrame:(CGRect)frame label:(NSString *)title bkgcolor:(UIColor *)rgba { self =