SCCatWaitingHUD 0.1.6

SCCatWaitingHUD 0.1.6

Tests(测试)已测试
Lang(语言)语言 Obj-CObjective C
License(许可证) MIT
Released(发布)最后发布Nov 2015(2015年11月)

Maintained by Sergio Chan(由Sergio Chan 维护).




  • By(由)
  • SergioChan

This is a cute and simple loading HUD :-P Enjoy!(这是一个可爱清新简单的加载 HUD :-P 请享受!)
这是一个可爱清新简单的加载 HUD 控件 :-P

Preview(预览)

image

image

Usage(用法)

要运行示例项目,请首先将仓库克隆到本地,然后在 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;

BackLog(更新日志)

  • v0.1.0 Basic Version(基本版本)
  • v0.1.1 Add Landscape Orientation Support(添加横屏支持)
  • v0.1.4 Add eye cover and Loading contentLabel animation(添加眼皮运动和下方的加载标签Label动画)
  • v0.1.5 Finish perfect timing function for eye cover movement and polish some of the codes(完成眼皮运动的时间函数,并优化部分代码)
  • v0.1.6 Add a new animate method that can customize duration for each loop(添加一个新的可以自定义每圈时间长度的 animate 方法)

  • v0.1.0 基本版本
  • v0.1.1 支持横屏
  • v0.1.4 添加眼皮运动和下方 Loading 字样的 Label
  • v0.1.5 优化代码结构,精确调整了眼皮和眼珠的运动时间曲线
  • v0.1.6 添加一个新的 animate 方法入口

Requirements(版本需求)

iOS 8.0 Above(iOS 8.0 及以上)

Installation(安装)

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

pod 'SCCatWaitingHUD', '~> 0.1.6'

License(许可证)

SCCatWaitingHUD 根据 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。