Here, we will add blue shadow to a UILabel:
UILabel *myLabel = [[UILabel alloc] init];
UIColor *color = [UIColor blueColor];
myLabel.layer.shadowColor = [color CGColor];
myLabel.layer.shadowRadius = 5.0f;
myLabel.layer.shadowOpacity = 1;
myLabel.layer.shadowOffset = CGSizeZero;
myLabel.layer.masksToBounds = NO;