我有一個基於Tweetie的Fast scrolling example的自定義單元格的UITableViewController,我需要透明度。無法在編程創建的自定義單元格中設置透明度
到現在爲止,我裝我的細胞筆尖和所有我需要的是設置一些表的屬性來
table.backgroundColor = [UIColor clearColor];
table.opaque = NO;
table.rowHeight = 130.0f;
table.separatorStyle = UITableViewCellSeparatorStyleNone;
爲了使表透明。至於電池,我所做的:
cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellbackground.png"]];
cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellbackground.png"]];
,所以我不得不每一個細胞與背景圖像,但是,其餘的完全透明(一半的圖像是完全透明的)。現在,以編程方式創建單元格並繪製所有內容,但我無法使單元格透明。圖像部分看起來不錯,但一切是黑色的,而不是不透明
您是否將單元格的backgroundColor設置爲clearColor? * cell.backgroundColor = [UIColor clearColor]; * – 2011-05-02 00:58:05