我自定義我的UITableView,我想出瞭如何設置每個單元格的選定顏色。在我cellForRowAtIndexPath
的方法,我有以下代碼:漸變imageView iOS
UIView *bgColorView = [[UIView alloc] init];
[bgColorView setBackgroundColor:[UIColor orangeColor]];
[cell setSelectedBackgroundView:bgColorView];
[bgColorView release];
但它是一個堅實的橙色。我想讓它看起來更光滑,並且從淺橙色到深橙色都有輕微的漸變。我怎樣才能做到這一點?