Play-/Source/ui_ios/BackgroundLayer.m

34 lines
911 B
Mathematica
Raw Permalink Normal View History

2015-08-17 12:48:29 -04:00
//
// BackgroundLayer.m
// Play
//
// Created by Lounge Katt on 8/17/15.
// Copyright (c) 2015 Jean-Philip Desjardins. All rights reserved.
//
#import "BackgroundLayer.h"
@implementation BackgroundLayer
//Blue gradient background
2020-12-02 18:37:31 -05:00
+ (CAGradientLayer*)blueGradient
{
UIColor* colorOne = [UIColor colorWithRed:(21 / 255.0) green:(169 / 255.0) blue:(207 / 255.0) alpha:1.0];
UIColor* colorTwo = [UIColor colorWithRed:(69 / 255.0) green:(67 / 255.0) blue:(142 / 255.0) alpha:1.0];
NSArray* colors = [NSArray arrayWithObjects:(id)colorOne.CGColor, colorTwo.CGColor, nil];
NSNumber* stopOne = [NSNumber numberWithFloat:0.0];
NSNumber* stopTwo = [NSNumber numberWithFloat:1.0];
NSArray* locations = [NSArray arrayWithObjects:stopOne, stopTwo, nil];
CAGradientLayer* headerLayer = [CAGradientLayer layer];
2015-08-17 12:48:29 -04:00
headerLayer.colors = colors;
headerLayer.locations = locations;
2020-12-02 18:37:31 -05:00
2015-08-17 12:48:29 -04:00
return headerLayer;
}
@end