In my UIViewController I create a CAGradientLayer in the viewDidLoad method:
CAGradientLayer *gradient = [CAGradientLayer layer]; gradient.frame = CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y + 44.0, self.view.bounds.size.width, self.view.bounds.size.height - 44.0); gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.953 green:0.961 blue:0.965 alpha:1.00] CGColor], (id)[[UIColor colorWithRed:0.729 green:0.749 blue:0.792 alpha:1.00] CGColor], nil]; [self.view.layer addSublayer:gradient]; The gradient works fine. Now this view has a subview (custom UIView subclass, added in Interface Builder) that draws a line. The problem is that the CAGradientLayer goes OVER the subview of the main view. If I comment out the code that creates the CAGradientLayer, I can see the contents of the subview just fine. Is there any way to make this CAGradientLayer go UNDER the subview? Independent Cocoa Developer, Macatomy Software http://macatomy.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com