2018正版葡京赌侠诗iOS开发必备HUD(透明指示层)

1.MBProgressHUD

GitHub地址:https://github.com/jdg/MBProgressHUD
大抵看到的主流iOS应用都集成了这么些,Star
7k了,最近见到成千上万采用HUD隐藏时,有一个动画过程,我还认为是自己增添的,后来探讨才发觉,有其一特性animationType:

@property (assign) MBProgressHUDAnimation animationType;

typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) {
    /** Opacity animation */
    MBProgressHUDAnimationFade,
    /** Opacity + scale animation */
    MBProgressHUDAnimationZoom,
    MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,
    MBProgressHUDAnimationZoomIn
};

Loading效果

2018正版葡京赌侠诗,还足以映现1行或2行文字

圆形进度圆

条形进度条

透过自定义图片形成的效应

能够假若文字提醒

2. SVProgressHUD

GitHub地址:https://github.com/TransitApp/SVProgressHUD
SVProgressHUD和MBProgressHUD效果差不多,特点就是不需要使用协议,同时也不需要讲明实例。直接通过类形式就可以调用:
[SVProgressHUD method]
[SVProgressHUD dismiss]

效果图.gif

3. JGProgressHUD

GitHub地址:https://github.com/JonasGessner/JGProgressHUD
JGProgressHUD和MBProgressHUD效果差不多,作为后起之秀,特点就是一旦有键盘时,HUD能够自动进化,效果非常棒!其余自定义定制也很灵巧。

JGProgressHUD效果图

4. Toast

GitHub地址:https://github.com/scalessec/Toast
其一Toast非凡经典。

// basic usage
[self.view makeToast:@"This is a piece of toast."];

// toast with duration, title, and position
[self.view makeToast:@"This is a piece of toast with a title." 
            duration:3.0
            position:CSToastPositionTop
               title:@"Toast Title"];

// toast with an image
[self.view makeToast:@"This is a piece of toast with an image." 
            duration:3.0
            position:[NSValue valueWithCGPoint:CGPointMake(110, 110)]
               image:[UIImage imageNamed:@"toast.png"]];

// display toast with an activity spinner
[self.view makeToastActivity];

Toast部分功力

此时此刻来说,从前4种HUD就能满意基本需要,实际开发中,集成到一个Utility中就更方便,等我完善了在放出去分享啦

发表评论

电子邮件地址不会被公开。 必填项已用*标注