【发布时间】:2012-02-02 22:30:43
【问题描述】:
在 UIButton 中,以下方法明确允许为不同的状态设置不同的图像:
// default is nil. should be same size if different for different states
- (void)setImage:(UIImage *)image forState:(UIControlState)state;
(1) UITableViewCell 也可以做类似的事情吗?例如,将某些状态切换为 true,然后设置 imageView?
// set selected state (title, image, background). default is NO. animated is NO
@property(nonatomic,getter=isSelected) BOOL selected;
// set highlighted state (title, image, background). default is NO. animated is NO
@property(nonatomic,getter=isHighlighted) BOOL highlighted;
(2) 更改会持续存在还是会简单地覆盖单一的 imageView?
(3) 在表格单元格中模拟每个状态的图像行为的最佳方法是什么?
【问题讨论】:
标签: iphone ios4 uitableview uibutton