UIView with rounded corners and drop shadow?
问题 I want a custom UIView ... : I just wanted a blank white view with rounded corners and a light drop shadow (with no lighting effect). I can do each of those one by one but the usual clipToBounds / maskToBounds conflicts occur. 回答1: The following code snippet adds a border, border radius, and drop shadow to v , a UIView : // border radius [v.layer setCornerRadius:30.0f]; // border [v.layer setBorderColor:[UIColor lightGrayColor].CGColor]; [v.layer setBorderWidth:1.5f]; // drop shadow [v.layer