我盯着构建一个应用程序,我希望我的应用程序中的所有按钮看起来都一样。我为一个按钮编写代码,我希望我的其他按钮看起来相似。这是我的按钮代码:
UIImage *butimage = [UIImage imageNamed:@"button1.png"];
UIImage *butimage3 = [UIImage imageNamed:@"button1press.png"];
UIImage *butpress = [butimage3 stretchableImageWithLeftCapWidth:15 topCapHeight:0];
UIImage *butimage2 = [butimage stretchableImageWithLeftCapWidth:15 topCapHeight:0];
[button1 setBackgroundImage:butimage2 forState:UIControlStateNormal];
[button1 setBackgroundImage:butpress forState:UIControlStateHighlighted];
[button1 setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
[button1 setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted];
我该怎么做?谢谢