0
cell.layer.shadowOpacity = 1.0;
cell.layer.shadowRadius = 5;
cell.layer.shadowColor = [UIColor blackColor].CGColor;
cell.layer.shadowOffset = CGSizeMake(0.0, -2.0);
cell.layer.shadowPath = [UIBezierPath bezierPathWithRect:cell.layer.bounds].CGPath;
我一直試圖讓陰影出現在我的細胞周圍,但是我沒有任何運氣。我甚至試着訂購我的細胞的zPosition,看它是否有效,什麼也沒有。我錯過了什麼?我無法在我的自定義UITableViewCells周圍出現陰影
我希望能夠吸引我的影子所以用index.row細胞= X似乎是電池上面index.row = X-1
你推薦我做什麼? – Jargen89
我不知道你想做什麼。我所做的是在內部繪製陰影,作爲單元格繪製其內容的一部分。 – matt
所以你在drawRect函數中繪製陰影? – Jargen89