I have a holder UIView, with some UILabels inside. There is a quartzcore dropshadow on the holder UIView, however the dropshadow doesn't appear on the UIView - instead it appears on the UILabels. Here is the code:
Code:
CGSize bs = self.view.frame.size;
barHolder = [[UIView alloc] initWithFrame:CGRectMake(0, 0, bs.width, mapView.frame.origin.y)];
barHolder.layer.masksToBounds = YES;
barHolder.layer.shadowColor = RGB(0, 0, 0).CGColor;
barHolder.layer.shadowOpacity = 1.0;
barHolder.layer.shadowRadius = 10.0;
barHolder.layer.shadowOffset = CGSizeMake(0.0f, 0.0f);
[self.view addSubview:barHolder];
border = [[UIView alloc] initWithFrame:CGRectMake(0, barHolder.frame.size.height-1, bs.width, 1)];
border.backgroundColor = RGB(74, 94, 122);
[barHolder addSubview:border];
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 7, bs.width/2, 20)];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
titleLabel.textColor = RGB(74, 94, 122);
titleLabel.text = @"Title:";
[barHolder addSubview:titleLabel];
UILabel *results = [[UILabel alloc] initWithFrame:CGRectMake(10, 23, bs.width/2, 20)];
results.backgroundColor = [UIColor clearColor];
results.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
results.textColor = RGB(62, 175, 229);
results.text = @"Subtitle";
[barHolder addSubview:results];