我有一個具有clearColor背景的自定義UITableView。我將單元格的backgroundView設置爲透明UIImageView,並將背景圖像視圖的backgroundColor設置爲[UIColor clearColor]
。我還將單元格的backgroundColor設置爲[UIColor clearColor]
。如何在選擇時使單元格透明
我想在選擇時使cell.backgroundview
爲透明。怎麼做?
我有一個具有clearColor背景的自定義UITableView。我將單元格的backgroundView設置爲透明UIImageView,並將背景圖像視圖的backgroundColor設置爲[UIColor clearColor]
。我還將單元格的backgroundColor設置爲[UIColor clearColor]
。如何在選擇時使單元格透明
我想在選擇時使cell.backgroundview
爲透明。怎麼做?
您可以明確地設置有半透明或透明的內容(的UIImageView)的細胞的selectedBackgroundView屬性,使我不會選擇成爲不透明
http://www.youtube.com/watch?v=PwcBdCUZNWs 我認爲是什麼烏爾要價僅僅只是讓selectedView透明從UI特性
在你的手機創作:
cell.selectedBackgroundView =[[UIImageView alloc] init];
((UIImageView *)cell.selectedBackgroundView).image = [UIImage imageNamed:@"your transparent UIImage"];
或:
UIView *v = [[UIView alloc] init];
v.backgroundColor = [UIColor clearColor];
cell.selectedBackgroundView = v;
Thanks..its working using cell.selectedBackgroundView =(transparent imageview) – iKT