Đây là mã của tôi.Bóng UIView không hoạt động
listView.layer.masksToBounds = NO;
listView.layer.shadowOffset = CGSizeMake(-3, 3);
listView.layer.shadowColor=[[UIColor blackColor] CGColor];
listView.layer.shadowRadius = 4;
listView.layer.shadowOpacity = 1.0;
[listView.layer setShouldRasterize:YES];
Nó hoạt động tốt với hiệu ứng đổ bóng.
Trong khi thay đổi
listView.layer.masksToBounds = YES;
tôi didnt có được bóng có hiệu lực.
'listView' là UIView –