(iphone) add shadow to uiview as a whole which has multiple layers
i'm adding a shadow with
self.layer.cornerRadius = 6.0;
self.layer.shadowOffset = CGSizeMake(offset,offset);
self.layer.shadowOpacity = 0.7f;
self.layer.shadowRadius = 5.0;
where self(UIImageView based) has multiple layers whose contents are images.
Looks like when I add a shadow with the above code, individual layer gets a shadow of its own.
I wonder if it's possible to add a shadow to a view as a whole.Besides, when I have many such image views with shadow, applicatio开发者_如何学编程n slows down noticeably.
Wonder if taking out some property like cornerRadius would reduce the drawing computation time. (hard to track down in instruments) Weird thing is, when the imageviews are on scrollviews, app doesn't get sluggish, but when they are placed on other view, app gets slowed down.Thank you.
精彩评论