PNGradientView/Example/PNGradientView/PNGradientViewViewController.m
Giuseppe Nucifora 07e9807316 - add method - (void) setBackgroundLayerWithColors:(NSArray *) colors startPoint:(CGPoint) startPoint angle:(CGFloat) angle
- add method - (void) setBackgroundLayerWithColors:(NSArray *) colors startPoint:(CGPoint) startPoint endPoint:(CGPoint) endPoint
2018-03-21 19:56:43 +01:00

33 lines
808 B
Objective-C

//
// PNGradientViewViewController.m
// PNGradientView
//
// Created by Giuseppe Nucifora on 01/12/2016.
// Copyright (c) 2016 Giuseppe Nucifora. All rights reserved.
//
#import "PNGradientViewViewController.h"
#import "PNGradientView.h"
@interface PNGradientViewViewController ()
@end
@implementation PNGradientViewViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.view.translatesAutoresizingMaskIntoConstraints = NO;
[(PNGradientView*)self.view setBackgroundLayerWithColors:@[[UIColor greenColor],[UIColor redColor]] startPoint:CGPointMake(0, 0) angle:0.5];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end