码迷,mamicode.com
首页 >  
搜索关键字:nsrunloop nstimer    ( 441个结果
iOS UI布局-定时器
定时器是比较常用的一个UI控件,在付款、抢购时,经常会使用到。提取成一个通用的方法/** * 倒计时GCD通用方法 * 通常用的计时器都是用NSTimer,但是NSTimer在线程很吃紧的时候效果不佳,使用GCD计时相对更好 * * @param seconds 倒计时间 单位:秒 * ...
分类:移动开发   时间:2015-11-26 21:06:56    阅读次数:150
iOS NSTimer
示例://创建scrollTimer =[NSTimer scheduledTimerWithTimeInterval:interval target:self selector:@selector(show) userInfo:nil repeats:YES];//使无效[scrollTimer ...
分类:移动开发   时间:2015-11-25 10:10:23    阅读次数:149
在子线程中使用runloop,正确操作NSTimer计时的注意点 三种可选方法
游戏中有一个计时功能。在1.0版本中,使用了简单的在主线程中调用:1 + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:...
分类:编程语言   时间:2015-11-24 21:12:19    阅读次数:207
UIScrollView
UIScrollView的常见属性UIScrollView的常用代理方法UIScrollView的缩放UIScrollView和UIPageControl的分页NSTimer的使用什么是UIScrollView移动设备的屏幕大小是极其有限的,因此直接展示在用户眼前的内容也相当有限当展示的内容较多,超...
分类:其他好文   时间:2015-11-23 18:12:02    阅读次数:162
NSTimer定时器的简单总结
NSTimer类是我们经常要用到的一个类库,它可以实现一个简单的定时器功能。NSTimer的初始化:1.添加一个每0.1s循环一次的NSTimer[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(go...
分类:其他好文   时间:2015-11-16 19:06:45    阅读次数:140
Objective-c 手写控件
.h文件 #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property(nonatomic,strong)NSTimer *timer; @end --------------------------------------------------------—————————...
分类:其他好文   时间:2015-11-16 14:12:40    阅读次数:158
NSTimer定时器使用
(一)定时器 运用NSTimer类来创建定时器类,或者更简单的来说,就是定时器。定时器等待一个确定的时间间隔后,就会执行特定的消息给目标对象。例如可以创建一个NSTimer类发送消息给一个 window,告诉他在一个确定的时间间隔来update他自己。 所以说定时器就是能够在接下来的时间执行或...
分类:其他好文   时间:2015-11-14 15:05:28    阅读次数:195
[非凡程序员]倒计时 uiimage uiDatePicker NSDate
//倒计时 @implementation?ViewController -?(void)viewDidLoad?{ ????[super?viewDidLoad]; ????[NSTimer?scheduledTimerWithTimeInterval:1.0f?target:self?selector:@selector(jishi)?userI...
分类:其他好文   时间:2015-11-13 19:31:49    阅读次数:266
计时器的写法
1 @interface MyPlanarCodeViewController () 2 //定义计时器 3 @property (nonatomic, strong) NSTimer *timer; 4 @end 5 6 @implementation MyPlanarCodeViewCo...
分类:其他好文   时间:2015-11-09 15:22:52    阅读次数:341
NSRunLoop 的那些事--持续更新
本文主要介绍NSRunLoop概念、特性及其应用。 一、NSRunLoop是什么、有什么用? 我们先看官方定义: “TheNSRunLoopclass declares the programmatic interface to objects that manage input ...
分类:其他好文   时间:2015-11-07 00:50:29    阅读次数:175
441条   上一页 1 ... 19 20 21 22 23 ... 45 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!