nsTimer的简单用法
//用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的简单用法的更多相关文章
- CATransition(os开发之画面切换) 的简单用法
CATransition 的简单用法 //引进CATransition 时要添加包“QuartzCore.framework”,然后引进“#import <QuartzCore/QuartzCo ...
- jquery.validate.js 表单验证简单用法
引入jquery.validate.js插件以及Jquery,在最后加上这个插件的方法名来引用.$('form').validate(); <!DOCTYPE html PUBLIC " ...
- NSCharacterSet 简单用法
NSCharacterSet 简单用法 NSCharacterSet其实是许多字符或者数字或者符号的组合,在网络处理的时候会用到 NSMutableCharacterSet *base = [NSMu ...
- [转]Valgrind简单用法
[转]Valgrind简单用法 http://www.cnblogs.com/sunyubo/archive/2010/05/05/2282170.html Valgrind的主要作者Julian S ...
- Oracle的substr函数简单用法
substr(字符串,截取开始位置,截取长度) //返回截取的字 substr('Hello World',0,1) //返回结果为 'H' *从字符串第一个字符开始截取长度为1的字符串 subst ...
- Ext.Net学习笔记19:Ext.Net FormPanel 简单用法
Ext.Net学习笔记19:Ext.Net FormPanel 简单用法 FormPanel是一个常用的控件,Ext.Net中的FormPanel控件同样具有非常丰富的功能,在接下来的笔记中我们将一起 ...
- TransactionScope简单用法
记录TransactionScope简单用法,示例如下: void Test() { using (TransactionScope scope = new TransactionScope()) { ...
- WPF之Treeview控件简单用法
TreeView:表示显示在树结构中分层数据具有项目可展开和折叠的控件 TreeView 的内容是可以包含丰富内容的 TreeViewItem 控件,如 Button 和 Image 控件.TreeV ...
- listActivity和ExpandableListActivity的简单用法
http://www.cnblogs.com/limingblogs/archive/2011/10/09/2204866.html 今天自己简单的总结了listActivity和Expandable ...
随机推荐
- linux和windows时间同步问题(UTC&localtime)
Linux使用 UTC,但是windows默认使用localtime.解决的办法如下(重启后生效). 进入windows使用regedit写入DWORD值(设置成十六进制"1"): ...
- Combination Sum II leetcode java
题目: Given a collection of candidate numbers (C) and a target number (T), find all unique combination ...
- Android -- 获取View宽高
在activity中可以调用View.getWidth.View.getHeight().View.getMeasuredWidth() .View.getgetMeasuredHeight()来获得 ...
- 如何获取当前应用程序所用的OpenGL ES的版本
如何获取当前应用程序所用的OpenGL ES的版本? [答案] char* glVersion = (char*)glGetString(GL_VERSION); LOGW(&qu ...
- [Algorithm] Delete a node from Binary Search Tree
The solution for the problem can be divided into three cases: case 1: if the delete node is leaf nod ...
- LintCode: 3 Sum
C++ 把3个数求和,转变为2个数求和 1. 把数组排序 2. 注意过滤重复值 3. 从前到后遍历,游标i 4. 从后边数中找start + end = -arr[i]的2 sum 5. start ...
- Lintcode: Unique Paths
C++ dp 递推式:dp[i][j] = dp[i-1][j] + dp[i][j-1] 初值:dp[i][j] = 1,i=0 or j=0 空间优化:省掉一维 class Solution { ...
- ZH奶酪:PHP 使用DOMDocument操作XML
原文链接:http://my.oschina.net/zhangb081511/blog/160113 PHP写XML方法很多,这里主要介绍一下DOMDocument的用法,跟 JS大体上相同,其实非 ...
- CSS 之 样式优先级机制
多重样式(Multiple Styles):如果外部样式.内部样式和内联样式同时应用于同一个元素,就是使多重样式的情况. 1.一般情况下,优先级从低到高,如下: 浏览器缺省(即浏览器默认) →(外部样 ...
- Spring Jdbc事例说明(三)
上一篇文章已经讲解了如何使用Spring搭建工程,这一篇文章是接着上一篇文章来描述的. 一.载入依赖 新增加了两个依赖,mysql数据库驱动和alibaba数据源包 <!-- mysql驱动包 ...