0
我有一個tableview,我定製了視圖單元格,並且我想在它們上繪製陰影。我已經使用視圖的圖層,但如果我通過這種方式繪製陰影,我的tableview非常慢。 這是代碼:我怎樣才能爲我的uiview繪製陰影
UIView *foreground = [[UIView alloc] initWithFrame:CGRectMake(8., 8., 305, 290.)];
foreground.tag = kForegroundTag;
foreground.backgroundColor = [UIColor whiteColor];
/* Draw from here */
foreground.layer.shadowColor = [UIColor blackColor].CGColor;
foreground.layer.shadowOpacity = 0.7;
foreground.layer.shadowOffset = CGSizeMake(0., 1.);
foreground.layer.shadowRadius = 3.;
THX你的幫助
最近對Quora的回答也表明'shadowPath'屬性是要走的路,並給出了一個示例用法:http://www.quora.com/iOS-Development/What-are-some-tricks-to -make-an-iOS-app-feel-responsive/answer/Aditya-Herlambang – jonkroll
THX你非常非常:D我現在有60fps :)鏈接的thx – marcL