博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nsTimer的简单用法
阅读量:6969 次
发布时间:2019-06-27

本文共 508 字,大约阅读时间需要 1 分钟。

//用nstimer的用法 一种用法,要手动加入到NsRunLoop中     NSTimer *time= [NSTimer timerWithTimeInterval:3 target:self selector:@selector(NoticeTransation) userInfo:nil repeats:YES];    [[NSRunLoop currentRunLoop] addTimer:time forMode:NSDefaultRunLoopMode];//手动加入到NSRunLoop中    [time fire];//立即触发定时器        //第二种方法   NSTimer *timer= [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(NoticeTransation) userInfo:nil repeats:YES];    [timer fire];

参考文章http://blog.csdn.net/samuelltk/article/details/7484533

你可能感兴趣的文章
利用awk i=!i 来输出奇偶行详解
查看>>
iframe高度自适应的方法
查看>>
对素数的判断和素数个数的判断
查看>>
TP之msubstr()
查看>>
星河时空尽头的我没理由放弃挨打的痛苦
查看>>
hibernate多对多关系
查看>>
一些比较优秀的代码总结
查看>>
bootstrap_04_列表
查看>>
WEB面试题
查看>>
w7无线网络密码破解
查看>>
focus-hooks
查看>>
Deep Learning 工具收集
查看>>
jqGrid的分页
查看>>
iOS7 隐藏状态栏
查看>>
获取类的属性列表、方法列表、实例变量列表
查看>>
学习笔记:逻辑运算符也有优先级区别
查看>>
小蚂蚁学习Redis笔记(12)——Redis重要特性——发布及订阅消息
查看>>
Docker with CentOS
查看>>
js单双引号嵌套传值问题
查看>>
Unity 消息发送机制 解析
查看>>