Skip to content

模仿MBProgressHUD 结合自己的用途 用swift 编码了一套功能相似的控件。

Notifications You must be signed in to change notification settings

wangshouye/WIndicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIndicator

2016-3-25 修改项:

  • 优化代码
  • 将WIndicator方法text替换成title

模仿MBProgressHUD 结合自己的用途 用swift 编码了一套功能一样的控件, 将这三个文件添加到工程中就可以了 WIndicator.swift、WActivityIndicator.swift、WIndicatorText.swift

用法如下 用法一:

    var indicator = WIndicator.showIndicatorAddedTo(self.view, animation: true)
    dispatch_async(dispatch_get_global_queue(0,0), { () -> Void in
        sleep(3)

        dispatch_async(dispatch_get_main_queue(), { () -> Void in
            WIndicator.removeIndicatorFrom(self.view, animation: true)
        })
    })

用法二:

    var indicator = WIndicator.showIndicatorAddedTo(self.view, animation: true)
    indicator.title = "swift比用法一多了一行文字"
    dispatch_async(dispatch_get_global_queue(0,0), { () -> Void in
       sleep(3)

        dispatch_async(dispatch_get_main_queue(), { () -> Void in
          WIndicator.removeIndicatorFrom(self.view, animation: true)
        })
    })

用法 三

  var indicator = WIndicator.showMsgInView(self.view, text: "浮动窗口测试", timeOut: 1.5)

About

模仿MBProgressHUD 结合自己的用途 用swift 编码了一套功能相似的控件。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages