How do you use groupTableViewBackgroundColor on iPad?

Recently when working on an XCode project we had set the background colour to groupTableViewBackgroundColor, which on an iPhone produces a pinstriped background, and works well. This background is the same one as used on UITableViews.

When porting this to iPad, the UITableViews now have a solid grey colour, and groupTableViewBackgroundColor essenitially is the same as [UIColor clearColor].

You would think that grabbing the colour that the UITableView uses would work. I am afraid it does not, as it turns out it  is a slight gradient, not so much as you would notice, but when you're changing views, you notice.

The way to fix this is to create a CAGradientLayer, and apply it to a UIView before anything else loads.
First off, you need to create a function that emulates the gradient, below is what I used:

-(CAGradientLayer *)groupGradientColour {
    CAGradientLayer *layer = [CAGradientLayer layer];
    layer.colors = [NSArray arrayWithObjects:
                    (id)[[UIColor colorWithRed:(0xE2 / 255.0) 
                                         green:(0xE5 / 255.0) 
                                          blue:(0xE9 / 255.0) 
                                         alpha:1.0] CGColor],
                    (id)[[UIColor colorWithRed:(0xD0 / 255.0) 
                                         green:(0xD2 / 255.0) 
                                          blue:(0xD7 / 255.0) 
                                         alpha:1.0] CGColor],
    layer.locations = [NSArray arrayWithObjects:
                       [NSNumber numberWithFloat:0.0f],
                       [NSNumber numberWithFloat:1.0f],
    return layer;

Then call this in viewDidLoad:

UIView *background = [[UIView alloc] init];
       background.frame = CGRectMake(
                                  [[UIScreen mainScreen] applicationFrame].size.width, 
                                  [[UIScreen mainScreen] applicationFrame].size.height);
    CAGradientLayer *gradient = [self groupGradientColour];
    gradient.frame = background.bounds;
    [background.layer insertSublayer:gradient atIndex:0];
    [self.view addView:background atIndex:0];

Once you have done this, you will have a gradient the same style as a UITableView.