Latest 1.0.0
Homepage https://github.com/RGSSoftware/RGSRadialGradientView
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

A simple Radial Gradient View for iOS.

iPhone 5

Installation

RGSRadialGradientView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "RGSRadialGradientView"

Using a RGSRadialGradientView from a View Controller


...
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];

    ...

    self.argv = [[RGSRadialGradientView alloc] initWithFrame:CGRectMake(self.view.center.x - 100, 30, 200,200)];

    self.argv.interColor = [UIColor colorWithRed:0.16 green:0.50 blue:0.73 alpha:1.0];
    self.argv.outerColor = [UIColor colorWithRed:0.91 green:0.30 blue:0.24 alpha:1.0];
    self.argv.radius = CGRectGetWidth(self.argv.frame)/2;
    self.argv.backgroundColor = [UIColor clearColor];
    [self.view addSubview:self.argv];

    ...

}

-(void)viewDidLayoutSubviews{
    [super viewDidLayoutSubviews];

    ...

    self.argv.gradientCenter = CGPointMake(CGRectGetWidth(self.argv.frame)/2, CGRectGetHeight(self.argv.frame)/2);

    ...
}

Todo

As of now RGSRadialGradientView is very simplistic, but over time I hope it can grow into a first class object like : https://developer.mozilla.org/en-US/docs/Web/CSS/radial-gradient.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

License

RGSRadialGradientView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RGSRadialGradientView",
    "version": "1.0.0",
    "summary": "A simple radial gradient view for iOS.",
    "description": "A simple, reusable radial gradient view for iOS.",
    "homepage": "https://github.com/RGSSoftware/RGSRadialGradientView",
    "license": "MIT",
    "authors": {
        "Randel Smith": "[email protected]"
    },
    "source": {
        "git": "https://github.com/RGSSoftware/RGSRadialGradientView.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "RGSRadialGradientView/Classes/**/*"
}

Pin It on Pinterest

Share This