iOS 呼吸灯效果:RCLighting
jopen
10年前
RCLighting 可在任意view里添加呼吸灯效果,所谓呼吸灯效果,就是颜色和亮度慢慢若隐若现。
支持CocoaPods,pod 'RCLighting'。
Requirements
- Xcode 5.0 or higher
- iOS 6.0 or higher
- ARC
- pop animation library
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.