/**
*显示弹出信息
*/
class func showAlertMessage(_ str:String,showtime Num:Double){ let alert = UIAlertView(title: str, message: nil, delegate: nil, cancelButtonTitle: nil);
alert.show()
// self.performSelector(#selector(dismissAlert(_:)), withObject: alert, afterDelay: Num)
let dispatchTime: DispatchTime = DispatchTime.now() + Double(Int64(0.10 * Num * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)
DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: {
dismissAlert(alert)
})
} class func dismissAlert(_ alert:UIAlertView){
alert.dismiss(withClickedButtonIndex: alert.cancelButtonIndex, animated: true)
}

  

Swift3 使用系统UIAlertView方法做吐司效果的更多相关文章

  1. UIView封装动画--iOS 利用系统提供方法来做弹性运动

    iOS 利用系统提供方法来做弹性运动 /*创建弹性动画 damping:阻尼,范围0-1,阻尼越接近于0,弹性效果越明显 velocity:弹性复位的速度 */ [UIView animateWith ...

  2. UIView封装动画--iOS利用系统提供方法来做转场动画

    UIView封装动画--iOS利用系统提供方法来做转场动画 UIViewAnimationOptions option; if (isNext) { option=UIViewAnimationOpt ...

  3. UIView封装动画--iOS利用系统提供方法来做关键帧动画

    iOS利用系统提供方法来做关键帧动画 ios7以后才有用. /*关键帧动画 options:UIViewKeyframeAnimationOptions类型 */ [UIView animateKey ...

  4. Method Swizzle黑魔法,修改 ios 系统类库方法 SEL IMP

    Method Swizzle黑魔法,修改 ios 系统类库方法   版权声明:本文为博主原创文章,未经博主允许不得转载. 一般来说,系统提供的方法已经足够开发了,但是有的时候有些需求用普通方法不好做. ...

  5. buntu下备份系统的方法

    今天不小心强行结束了一不知道用处的进程,结果造成进不了x界面,gdm启动不了,使用apt-get进行修复,结果几乎要把整个x界面有关的软件包删除,所以只好重装系统,为了防止下次出现类似的问题,所以把系 ...

  6. Android获取系统时间方法的总结

    Android获取系统时间方法的方法有很多种,常用的有Calendar.Date.currentTimeMills等方法. (1)Calendar Calendar获取系统时间首先要用Calendar ...

  7. 重新格式化hdfs系统的方法

    重新格式化hdfs系统的方法: (1)查看hdfs-ste.xml <span style="font-size:18px;"><property> < ...

  8. tar备份系统的方法

    下面是备份系统的方法: 然后打开终端,输入以下命令: 1.成为根用户:   sudo su 2.转到根目录:   cd / 然後,下面就是我用来备份我的系统的完整的命令:tar -cvpzf /med ...

  9. 下载文件 ,调用系统的方法(UIDocumentInteractionController) 查看

随机推荐

  1. 十年百度工作心得(月薪75k)

    百度,是多少从事IT事业的程序员梦寐以求的地方,能进入这样大厂的程序员可以说都是数一数二的人才. 最近有不少朋友问,成为百度,腾讯,阿里Java架构师需要系统学习哪些Java技术. 下面分享互联网Ja ...

  2. svn 回滚文件修改

    取消对代码的修改分为两种情况:   第一种情况:改动没有被提交(commit). 这种情况下,使用svn revert就能取消之前的修改. svn revert用法如下: # svn revert [ ...

  3. delphi 7 求无码

    我们知道delphi很多源码,都是没有提供的,比如BDE,一旦有问题,我们也找不到办法解决,那么那些dcu对应的pas是没有公布的呢?笔者做了个统计. 下面是delphi7 的,如果你的程序有用到没有 ...

  4. filedisk.sys

    i386 amd http://blog.sina.com.cn/s/blog_4fcd1ea30100r19r.html

  5. Statement、PreparedStatement、CallableStatement的区别

    此三个接口的声明如下: public interface Statement extends Wrapper, AutoCloseable public interface PreparedState ...

  6. Centos7 开启vsftpd

    Centos 1.开启DNS 可yum install (操作后要关闭) # vi /etc/resolv.conf# (INSERT)nameserver 8.8.8.8# (INSERT)表示按I ...

  7. 火狐 debug 看向后台传递的信息

    自己做前端和后台开发,最重要的是数据交换,知道了数据是怎么传的,传到哪里,传的什么,就能很容易的开发. 火狐看传递参数的信息在debug里面,详情如图: 我的后台的C# 的webservice,接收起 ...

  8. 外部javascript形式

    ***.js: /** * 收起或者展开筛选框 */ function filterType(){ $("#filter_box_id").toggle(500); var sha ...

  9. C# 遇到 which has a higher version than referenced assembly

    当C#遇到这种提示: which has a higher version than referenced assembly, 说明有两个或多个工程引用的dll的版本有出现不一样, 如: A工程引用l ...

  10. spring学习 六 spring与mybatis整合

    在mybatis学习中有两种配置文件 :全局配置文件,映射配置文件.mybatis和spring整合,其实就是把mybatis中的全局配置文件的配置内容都变成一个spring容器的一个bean,让sp ...