Awesome Open Source
Awesome Open Source

The library is inspired by Skeleton

Skeleton

👩‍💻 Usage

import the OCSkeleton: #import <OCSkeleton.h>

You can use the OCGradientLayer directly:

@interface OCGradientLayer : CAGradientLayer

- (void)slideToDir:(OCDirection)direction animations:(void (^)(CAAnimationGroup *))group;

- (void)stopSliding;

@end

Or you can use the OCGradientContainerView to intergate with autolayout:

  1. Make your view confrom to OCGradientsOwner protocol
  2. Use the API
@interface UIView (OCGradientsOwner)

- (void)slideToDir:(OCDirection)direction animations:(void (^)(CAAnimationGroup *))group;

- (void)stopSliding;

@end


Check out the example for more.

📚 Example

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

🛠 Installation

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

pod 'OCSkeleton'

Author

mayqiyue, [email protected]

License

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


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
objective-c (10,924) 
loader (165) 
skeleton (96) 
placeholder (68) 
gradient (59) 
loading-animations (44)