Tests(测试)已测试 | ✗ |
Lang(语言)语言 | Obj-CObjective C |
License(许可证) | MIT |
Released(发布)最后发布 | Nov 2015(2015年11月) |
Maintained by Sergio Chan(由Sergio Chan 维护).
This is a cute and simple loading HUD :-P Enjoy!(这是一个可爱清新简单的加载 HUD :-P 请享受!)
这是一个可爱清新简单的加载 HUD 控件 :-P
要运行示例项目,请首先将仓库克隆到本地,然后在 Example 目录下运行 pod install
。
想要运行示例工程,将这个仓库 clone 到本地,在 Example
目录下运行 pod install
。
使用方法很简单:
用法很简单:
if(![SCCatWaitingHUD sharedInstance].isAnimating)
{
[[SCCatWaitingHUD sharedInstance] animate];
}
else
{
[[SCCatWaitingHUD sharedInstance] stop];
}
这里我提供了你调用 animate
方法的几种复杂的方式。
有些加载交互需要阻塞用户当前的操作,因此在这里我提供了两种更复杂一些的方式来调用 animate
方法。
/**
* 动画的时候是否允许和原始的View进行交互
* Whether you can interact with the original view while animating
*
* @param enabled YES代表能响应原生View事件,NO代表block当前所有的手势操作
*/
- (void)animateWithInteractionEnabled:(BOOL)enabled;
/**
* You can attach your HUD title to the view using this animation method.
*
* @param enabled YES代表能响应原生View事件,NO代表block当前所有的手势操作
* @param title HUD title
*/
- (void)animateWithInteractionEnabled:(BOOL)enabled title:(NSString *)title;
另外,我在 0.1.6 版本提供了一个更新的调用 animate
方法的接口,可以让你自定义每圈的时间,从而修改旋转的速度,默认值是 4 秒一圈,在这个速度下老鼠跑的不会异常的快,当然提供给你这个方法是让你可以让它跑得更快。
另外我在 0.1.6 版本提供了一个更新的调用 animate
方法的接口,可以让你自定义每转一圈的时长,从而修改旋转的速度,默认值是 4 秒一圈,在这个速度下老鼠跑的不会异常的快,当然提供给你这个方法是让你可以让它跑得更快。
/**
* You can also customize duration for each loop (also can be represented as speed) using this animation method. Default duration is 4.0 seconds each loop.
*
* @param enabled YES代表能响应原生View事件,NO代表block当前所有的手势操作
* @param title HUD title
* @param duration time for each loop
*/
- (void)animateWithInteractionEnabled:(BOOL)enabled title:(NSString *)title duration:(CGFloat)duration;
iOS 8.0 Above(iOS 8.0 及以上)
SCCatWaitingHUD 通过 CocoaPods 提供。要安装,只需将以下行添加到 Podfile 中
pod 'SCCatWaitingHUD', '~> 0.1.6'
SCCatWaitingHUD 根据 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。