Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mayqiyue/OCSkeleton
[OCSkeleton] - Make your loading view a little difference.
https://github.com/mayqiyue/OCSkeleton
gradient loader loading-animations obje objective-c placeholder skeleton
Last synced: 29 days ago
JSON representation
[OCSkeleton] - Make your loading view a little difference.
- Host: GitHub
- URL: https://github.com/mayqiyue/OCSkeleton
- Owner: mayqiyue
- License: mit
- Created: 2018-03-05T07:00:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T04:33:11.000Z (over 4 years ago)
- Last Synced: 2024-10-11T09:05:55.561Z (2 months ago)
- Topics: gradient, loader, loading-animations, obje, objective-c, placeholder, skeleton
- Language: Objective-C
- Homepage:
- Size: 411 KB
- Stars: 186
- Watchers: 4
- Forks: 51
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gradient - OCSkeleton - Make your loading view a little difference. (Objective-C)
README
### The library is inspired by [Skeleton](https://github.com/gonzalonunez/Skeleton)
![](./skeleton-logo-animation.gif)
## 👩💻 Usage
### import the OCSkeleton: \#import \
#### You can use the *OCGradientLayer* directly:
```ObjC
@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```ObjC
@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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'OCSkeleton'
```## Author
mayqiyue, [email protected]
## License
OCSkeleton is available under the MIT license. See the LICENSE file for more info.