I want to add the gradient as a background to label. I used the following code to acheive that. but the problem is that though the gradient color appears on the label, but the text is not visible. please help
lblPatientDetail.text=PatientsDetails;
lblPatientDetail.textColor=[UIColor blackColor];
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = lblPatientDetail.bounds;
gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor whiteColor] CGColor],(id)[[UIColor colorWithRed:255/255.0 green:239/255.0 blue:215/255.0 alpha:1.0] CGColor],nil];
[lblPatientDetail.layer addSublayer:gradient];
lblPatientDetail.backgroundColor=[UIColor clearColor];