Setting corner radius on UIDatePicker with a background color
问题 I have a UIDatePicker in my view and have set the background color of the UIDatePicker : self.datePicker.backgroundColor = [UIColor lightTextColor]; self.datePicker.layer.cornerRadius = 10; This successfully puts a background behind the UIDatePicker ( which in iOS7 is essentially transparent ) but fails to make the rounded corners for the background that I am looking for ( I do this same thing for an image on the screen and it works perfectly ). It seems that the corner radius doesn't affect