首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

UITableViewCell被选中时样式的自定义有关问题

2012-08-29 
UITableViewCell被选中时样式的自定义问题???我自定义了一个cell,想在选中时,自定义一个图片作为其背景.?

UITableViewCell被选中时样式的自定义问题

?

??我自定义了一个cell,想在选中时,自定义一个图片作为其背景.

?

这两天遇到这样的问题:

??我自定义了一个cell,想在选中时,自定义一个图片作为其背景.

?

于是乎我在cell的类中方法- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

    [super setSelected:selected animated:animated];if (selected) {_bgImgView.image = [UIImage imageNamed:@"bg_whtie.png"];} else {_bgImgView.image = [UIImage imageNamed:@"bg_green.png"];}}

?but which do not work.

?then,i look up the document and find?

cell.selectionStyle = UITableViewCellSelectionStyleNone;

add this ,which work good.

?

?

热点排行