OCSkeleton 0.5.1

OCSkeleton 0.5.1

may362321  维护。



  • mayqiyue

这个库受 Skeleton 的启发

Skeleton

👩‍💻用法

导入 OCSkeleton: #import <OCSkeleton.h>

您可以直接使用 OCGradientLayer

@interface OCGradientLayer : CAGradientLayer

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

- (void)stopSliding;

@end

或者,您可以使用 OCGradientContainerView 与 autolayout 集成

  1. 使您的视图遵守 OCGradientsOwner 协议
  2. 使用 API
@interface UIView (OCGradientsOwner)

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

- (void)stopSliding;

@end

查看示例以获取更多信息。

📚示例

要运行示例项目,请克隆仓库,并且首先在 Example 目录中运行 pod install

🛠安装

OCSkeleton 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'OCSkeleton'

作者

马茜悦,[email protected]

许可证

OCSkeleton 可在 MIT 许可证下获得。查看 LICENSE 文件以获取更多信息。