【发布时间】:2010-11-30 23:46:01
【问题描述】:
我正在绘制一个自定义按钮:
UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
myButton.frame = CGRectMake(10,10,44,70);
[myButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[myButton setTitle:@"Order" forState:UIControlStateNormal];
当我点击按钮时,背景颜色不会改变。我是否需要为正常状态和选定状态使用不同的图像?这里有什么诀窍?
【问题讨论】:
标签: iphone objective-c cocoa-touch uibutton