I am working with UIDatePicker where i need to set borderWidth, borderColor and cornerRadius. But i can't make it work. I have masksToBounds to YES also.
dPicker.layer.masksToBounds=YES;
dateBtn.layer.borderWidth = 2.0;
dateBtn.layer.borderColor = [[UIColor redColor]CGColor];
dateBtn.layer.cornerRadius =5.0;
Any solution please ?
Works great for me:
self.datePicker.layer.borderColor = [UIColor grayColor].CGColor;
self.datePicker.layer.borderWidth = 1.0f;
self.datePicker.layer.cornerRadius = 5.0f;
self.datePicker.layer.masksToBounds = YES;