title: Add CAGradient Layer behind UIImageView iOS
body: <p>I am trying to add a gradient behind a transparent image. I do this on the map leftCallOutAccessoryView however no matter what I try the gradient layer always shows above the imageView and want it to appear behind it</p>
  
  <p>heres my code for MKAnnotationView which is an ivar called pinView</p>
  
  <pre><code>pinView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
  
  UIImageView *profileIconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Profile.png"]];
  pinView.leftCalloutAccessoryView = profileIconView;
  
  CAGradientLayer *backgroundLayer = [CAGradientLayer layer];
  backgroundLayer.frame = CGRectMake(0, 0, 30, 30);
  backgroundLayer.cornerRadius = 2;
  backgroundLayer.borderWidth = 1;
  backgroundLayer.borderColor = [UIColor whiteColor].CGColor;
  backgroundLayer.colors = [NSArray arrayWithObjects:(id)[[sharedManager cellGradientEnd] CGColor], (id)[[sharedManager cellGradientStart] CGColor], nil];
  [profileIconView.layer insertSublayer:backgroundLayer atIndex:0];
  </code></pre>