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

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

nsTimer的简单用法的更多相关文章

  1. CATransition(os开发之画面切换) 的简单用法

    CATransition 的简单用法 //引进CATransition 时要添加包“QuartzCore.framework”,然后引进“#import <QuartzCore/QuartzCo ...

  2. jquery.validate.js 表单验证简单用法

    引入jquery.validate.js插件以及Jquery,在最后加上这个插件的方法名来引用.$('form').validate(); <!DOCTYPE html PUBLIC " ...

  3. NSCharacterSet 简单用法

    NSCharacterSet 简单用法 NSCharacterSet其实是许多字符或者数字或者符号的组合,在网络处理的时候会用到 NSMutableCharacterSet *base = [NSMu ...

  4. [转]Valgrind简单用法

    [转]Valgrind简单用法 http://www.cnblogs.com/sunyubo/archive/2010/05/05/2282170.html Valgrind的主要作者Julian S ...

  5. Oracle的substr函数简单用法

    substr(字符串,截取开始位置,截取长度) //返回截取的字 substr('Hello World',0,1) //返回结果为 'H'  *从字符串第一个字符开始截取长度为1的字符串 subst ...

  6. Ext.Net学习笔记19:Ext.Net FormPanel 简单用法

    Ext.Net学习笔记19:Ext.Net FormPanel 简单用法 FormPanel是一个常用的控件,Ext.Net中的FormPanel控件同样具有非常丰富的功能,在接下来的笔记中我们将一起 ...

  7. TransactionScope简单用法

    记录TransactionScope简单用法,示例如下: void Test() { using (TransactionScope scope = new TransactionScope()) { ...

  8. WPF之Treeview控件简单用法

    TreeView:表示显示在树结构中分层数据具有项目可展开和折叠的控件 TreeView 的内容是可以包含丰富内容的 TreeViewItem 控件,如 Button 和 Image 控件.TreeV ...

  9. listActivity和ExpandableListActivity的简单用法

    http://www.cnblogs.com/limingblogs/archive/2011/10/09/2204866.html 今天自己简单的总结了listActivity和Expandable ...

随机推荐

  1. Windows server 2008 SSD性能测试

    过渡到windows 7.windows8是趋势,老迈的windows xp .windows server 2003已经快到淘汰的阶段,安装了windows server 2008 R2 ,测试了下 ...

  2. css文件放在根目录之后不起作用原因

    修改为

  3. PKU-2104-K-th Number

    K-th Number Time Limit: 20000MS   Memory Limit: 65536K Total Submissions: 36045   Accepted: 11522 Ca ...

  4. Install Hyper-V on Windows 10

      Enable Hyper-V to create virtual machines on Windows 10.Hyper-V can be enabled in many ways includ ...

  5. ElasticSearch 5.X 搜索并用高亮显示

    public List<WOSearchModel> searchOrder(OrderSearchReqVO request) throws Exception{List<WOSe ...

  6. robot framework + python实现http接口自动化测试框架

    https://www.jianshu.com/p/6d1e8cb90e7d 前言 下周即将展开一个http接口测试的需求,刚刚完成的java类接口测试工作中,由于之前犯懒,没有提前搭建好自动化回归测 ...

  7. 【nodejs】理想论坛帖子下载爬虫1.07 使用request模块后稳定多了

    在1.06版本时,访问网页采用的时http.request,但调用次数多以后就问题来了. 寻找别的方案时看到了https://cnodejs.org/topic/53142ef833dbcb076d0 ...

  8. maven 打包可执行jar的方法

    转自:http://blog.csdn.net/johnnywww/article/details/7964326 1.修改pom.xml增加如下内容 <plugin> <group ...

  9. wdcp下nginx+apache混合模式的主机配置

    /www/wdlinux/httpd-2.2.22/conf/vhost/xxx.xxx.com.conf <VirtualHost *:88>DocumentRoot /www/web/ ...

  10. 20160205.CCPP体系具体解释(0015天)

    程序片段(01):01.杨辉三角.c 内容概要:杨辉三角 #include <stdio.h> #include <stdlib.h> #define N 10 //01.杨辉 ...