title: Gradient backgrounds work in iOS 8 but not iOS 7
body: <p>So I'm building a table view centric app, and I'm trying to include a gradient background for each table view cell, using the following code:</p>
  
  <pre><code>CAGradientLayer *gradient = [CAGradientLayer layer];
  gradient.frame = cell.bounds;
  gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.94 green:0.84 blue:0.49 alpha:1.0]CGColor], (id)[[UIColor colorWithRed:0.93 green:0.86 blue:0.61 alpha:1.0]CGColor], nil];
  [cell.layer insertSublayer:gradient atIndex:0];
  cell.textLabel.backgroundColor = [UIColor clearColor];
  cell.textLabel.textColor = [UIColor colorWithRed:0.25 green:0.51 blue:0.00 alpha:1.0];
  </code></pre>
  
  <p>Now, in the simulator that I am using, which is running iOS 8 (using Xcode 6 Beta 2), I get this result: 
  <img src="https://i.stack.imgur.com/Ho2Nu.png" alt="enter image description here"></p>
  
  <p>But on my device (sorry for the Assistive touch, my lock button is broken...), running iOS 7, it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/rxWLY.png" alt="enter image description here"></p>
  
  <p>My gradients throughout the app in the main view background work on both, it's just the gradients in the table cell views that don't work. As you can also see in these screenshots, the section header views also have gradients, but these work in both versions. Is there a certain flag I need to be looking for to make this work in iOS 7?</p>
  
  <p>Edit: 
  This is being called in cellForRowAtIndexPath. </p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
  
  CAGradientLayer *gradient = [CAGradientLayer layer];
  gradient.frame = cell.bounds;
  gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithRed:0.94 green:0.84 blue:0.49 alpha:1.0]CGColor], (id)[[UIColor colorWithRed:0.93 green:0.86 blue:0.61 alpha:1.0]CGColor], nil];
  [cell.layer insertSublayer:gradient atIndex:0];
  cell.textLabel.backgroundColor = [UIColor clearColor];
  cell.textLabel.textColor = [UIColor colorWithRed:0.25 green:0.51 blue:0.00 alpha:1.0];
  
  NSDictionary *match;
  if(indexPath.section == 0) {
      match = [_inprogressMatches objectAtIndex:indexPath.row];
  } else if(indexPath.section == 1) {
      match = [_finalMatches objectAtIndex:indexPath.row];
  } else {
      match = [_pregameMatches objectAtIndex:indexPath.row];
  }
  
  NSDictionary *homeTeam = [match objectForKey:@"homeTeamId"];
  NSDictionary *awayTeam = [match objectForKey:@"awayTeamId"];    
  cell.textLabel.text = [NSString stringWithFormat:@"%@ %@ : %@ %@",[awayTeam objectForKey:@"name"] , [match objectForKey:@"awayScore"], [match objectForKey:@"homeScore"], [homeTeam objectForKey:@"name"]];
  
  return cell;
  }
  </code></pre>