SVProgressHUD 用法一 

SVProgressHUD 是一个第三方的控件,是一个弹出提示层,用来提示 网络加载 或 提示对错,看下面图,你就明白了:

 
 
那么,SVProgressHUD 都有什么特点呢:
 
1. 提示当前的状态,如:网络传输、提交中、操作成功或失败等等.
 
2. 可是设置提示的 pop layer 是否为 model,就是,提示的时间是否允许用户做其他操作
 
3. 可以设置 背景色 和 自定义提示的内容
 
4. 使用起来非常简洁,代码量非常少
 
 
 
那么如何使用 SVProgressHUD 呢:
 
1. 官网下载代码,并放入到项目中
 
2. 在使用到的 项目 里面,加入引用  #import "SVProgressHUD.h"
 
3. 在需要提示的地方,加入调用代码 ,如:    
[SVProgressHUD showWithStatus:@"加载中..." maskType:SVProgressHUDMaskTypeGradient]
 
4. 在需要隐藏的地方,加入隐藏当前提示的代码,如:[SVProgressHUD dismiss]
 
 
SVProgressHUD 常用方法介绍:
 
1. + (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType 调用 SVProgressHUD,并自定义 提示的内容 和 提示层的样式
 
2. + (void)dismiss 关闭当前提示
 
 
SVProgressHUDMaskType 介绍:
 
1. SVProgressHUDMaskTypeNone : 当提示显示的时间,用户仍然可以做其他操作,比如View 上面的输入等
 
2. SVProgressHUDMaskTypeClear : 用户不可以做其他操作
 
3. SVProgressHUDMaskTypeBlack : 用户不可以做其他操作,并且背景色是黑色
 
4. SVProgressHUDMaskTypeGradient : 用户不可以做其他操作,并且背景色是渐变的
 
 
SVProgressHUD 全部方法:
 
+ (void)show;
+ (void)showWithStatus:(NSString*)status;
+ (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType;
+ (void)showWithMaskType:(SVProgressHUDMaskType)maskType; + (void)showSuccessWithStatus:(NSString*)string;
+ (void)showSuccessWithStatus:(NSString *)string duration:(NSTimeInterval)duration;
+ (void)showErrorWithStatus:(NSString *)string;
+ (void)showErrorWithStatus:(NSString *)string duration:(NSTimeInterval)duration; + (void)setStatus:(NSString*)string; // change the HUD loading status while it's showing + (void)dismiss; // simply dismiss the HUD with a fade+scale out animation
+ (void)dismissWithSuccess:(NSString*)successString; // also displays the success icon image
+ (void)dismissWithSuccess:(NSString*)successString afterDelay:(NSTimeInterval)seconds;
+ (void)dismissWithError:(NSString*)errorString; // also displays the error icon image
+ (void)dismissWithError:(NSString*)errorString afterDelay:(NSTimeInterval)seconds; + (BOOL)isVisible;

SVProgressHUD 用法一的更多相关文章

  1. SVProgressHUD

    原文:http://cht005288201307234627.iteye.com/blog/1927961 SVProgressHUD和MBProgressHUD效果差不多,不过不需要使用协议,同时 ...

  2. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->使用spring framework的IoC容器功能----->方法一:使用XML文件定义beans之间的依赖注入关系

    XML-based configuration metadata(使用XML文件定义beans之间的依赖注入关系) 第一部分 编程思路概述 step1,在XML文件中定义各个bean之间的依赖关系. ...

  3. (20160601)开源第三方学习之SVProgressHUD

    SVProgressHUD相信在很多项目中都有运用,运用于弹出窗提示效果: 地址:https://github.com/SVProgressHUD/SVProgressHUD 一:插件的运用 1.1 ...

  4. SVProgressHUD进度条蒙版

    GitHub:https://github.com/samvermette/SVProgressHUDSVProgressHUD和MBProgressHUD效果差不多,不过不需要使用协议,同时也不需要 ...

  5. JBOSS通过Apache负载均衡方法一:使用mod_jk

    JBOSS通过Apache负载均衡方法一:使用mod_jk   本文第一.二节分别对Linux环境下前端使用Apache以及windows环境下前端使用IIS通过AJP协议和后端的JBOSS通信实现负 ...

  6. SVProgressHUD 用法

    SVProgressHUD 是一个第三方的控件,是一个弹出提示层,用来提示 网络加载 或 提示对错,看下面图,你就明白了:     那么,SVProgressHUD 都有什么特点呢:   1. 提示当 ...

  7. SVProgressHUD的使用

    GitHub:https://github.com/samvermette/SVProgressHUD SVProgressHUD和MBProgressHUD效果差点儿相同,只是不须要使用协议,同一时 ...

  8. SVProgressHUD源码解读(2.0.3)

    SVProgressHUD是iOS开发中比较常用的一个三方库,用来在执行耗时操作或者指示用户操作结果的场合,由于使用简单,功能丰富,交互友好,被广泛应用.本文从源码的角度,解读一下实现的过程,希望能起 ...

  9. SVProgressHUD提示框IOS

    SVProgressHUD--比MBProgressHUD更好用的 iOS进度提示组件 项目里用到SVProgressHud,感觉背景颜色太丑,因为很久很久以前改过,就想在这个项目里也改下,但是时间过 ...

随机推荐

  1. kb-07线段树-03--区间修改查询--lazy思想

    /* 区间修改,区间查询和: 第一次使用lazy思想: poj3468 */ #include<iostream> #include<cstdio> #include<c ...

  2. [POJ3974]Palindrome(后缀数组 || manacher)

    传送门 求一个串的最长回文子串的长度 1.后缀数组 把这个串反转后接到原串的后面,中间连一个没有出现过的字符. 然后求这个新字符串的某两个后缀的公共前缀的最大值即可. ——代码 #include &l ...

  3. Python Base Three

    //sixth day to study python(2016/8/7) 32. In python , there are have an special type dictionary , it ...

  4. ubuntu通过cifs-utils访问Windows共享目录

    ubuntu旧一点的版本如:12.0x是用smbclient访问window共享的,但比较新的版本如:16.04是通过cifs-utils访问Windows共享目录 同样道理先安装: apt-get ...

  5. JS判断SharePoint页面编辑状态

    这篇博客主要讲使用不同的客户端方式来判断页面的编辑模式. 1.当页面处于发布状态时,可以使用下面两种方式:if(g_disableCheckoutInEditMode == true) {   ale ...

  6. 计算机图形——OpenGL

    荒废了太久,趁着"寒假"死磕了两周,验证了不少想法,解开了不少疑惑,代码质量当然是没有的,一切只为看到结果. 有空了再写每一项的细节. 源码地址 2019/5/12 更新 延迟渲染 ...

  7. Day 21 三元表达式、生成器函数、列表解析

    知识点程序: #! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = "DaChao" # Date: 2017 ...

  8. 被动路由跟踪工具InTrace

    被动路由跟踪工具InTrace   InTrace是一款类似于Traceroute的路由跟踪工具.但它不同的是,他不主动发送数据包,而是通过监听当前主机和目标主机的数据包,进行分析,从而获取路由信息. ...

  9. CodeForces - 11D A Simple Task

    Discription Given a simple graph, output the number of simple cycles in it. A simple cycle is a cycl ...

  10. trick点

    1.问题里有取模操作的时候,最后输出(ans+mod)%mod 2.涉及到输出实数0的时候要特判输出的会不是是-0.000000(因为0.00乘一个负的浮点数结果是-0.000000,乘一个正的浮点数 ...