Latest 0.1
Homepage https://github.com/RidgeCorn/RCLighting
License MIT
Platforms ios 6.0, requires ARC
Dependencies pop
Authors

License MIT
Build Platform
Build Version
Build Status

Simple lighting (breathing light) effect appears in your view.

RCLightingDemo

Any idea to make this more awesome? Please feel free to open an issue or make a PR.

Requirements

Run Example

In your terminal,

cd [workspace]/RCLighting/RCLightingExample
pod install

Then,

open RCLightingExample.xcworkspace

Installation

The recommended approach for installating RCLighting is via the CocoaPods package manager.

In your Podfile, add a line shows below:

pod 'RCLighting'

Then,

pod update

Usage

First of all

#import <RCLighting.h>

Show & Remove

Just one line code to show Lighting, it’s very easy to use.

[self.view showLighting]; // That's it!

Default lighting color is view’s background color.

Remove Lighting is as simple as above,

[self.view removeLighting];

Pause & Resume (Debugging)

To pause Lighting in view,

[self.view pauseLighting];

To resume Lighting in view,

[self.view resumeLighting];

[animation setPaused:NO] is not working on POPBasicAnimation if stop using tracer debug.
I’m work very hard on it.
Let me know if you see something.

State

To get current Lighting state in view,

[self.view lightingState];

Return type is RCLightingState.

The value of state would be RCLightingStateStopped, RCLightingStateLighting and RCLightingStatePausing.

Custom

Custom Colors

There are two methods supports custom colors

- (void)showLightingWithColors:(NSArray *)colors; // Lighting With a group of colors.
- (void)showLightingWithColor:(UIColor *)color; // Lighting With one color.

And is easy to use,

[self.view showLightingWithColors:@[[UIColor redColor]]];

RCLightingLayer

If you want to know more about Lighting, the class RCLightingLayer is what you wanted. See RCLighting.h for more details.

Sample code below shows how to use RCLightingLayer,

RCLightingLayer *lightingLayer = [[RCLightingLayer alloc] initWithColors:@[[UIColor redColor]]]; 
lightingLayer.perLightingDuration = 2.f;
lightingLayer.kBackgroundColorAlpha = 1.f;
[self.view showWithLighting:lightingLayer]; 

License

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

Latest podspec

{
    "name": "RCLighting",
    "version": "0.1",
    "summary": "Simple lighting (breathing light) effect.",
    "homepage": "https://github.com/RidgeCorn/RCLighting",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Looping": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/RidgeCorn/RCLighting.git",
        "tag": "0.1"
    },
    "source_files": "RCLighting",
    "public_header_files": "RCLighting/*.h",
    "requires_arc": true,
    "dependencies": {
        "pop": []
    }
}

Pin It on Pinterest

Share This