2014年10月25日

摘要: 一直以来都想好好学习下CoreAnimation,奈何涉及的东西太多,想要一次性全部搞定时间上不允许,以后会断断续续的补全。最近项目里用到了CADisplayLink,就顺便花点时间看了看。一、简介1、所在框架CADisplayLink和其它CoreAnimation类一样,都是在QuartzCor... 阅读全文
posted @ 2014-10-25 16:52 banish 阅读(223) 评论(0) 推荐(0)
 
摘要: 第一种:用CADisplayLink可以实现不停重绘。例子:CADisplayLink* gameTimer;gameTimer= [CADisplayLink displayLinkWithTarget:selfselector:@selector(updateDisplay:)];[gameTi... 阅读全文
posted @ 2014-10-25 16:31 banish 阅读(640) 评论(1) 推荐(0)
 
摘要: 1、初始化+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;+ (N... 阅读全文
posted @ 2014-10-25 16:30 banish 阅读(162) 评论(0) 推荐(0)
 
摘要: 调用一次计时器方法:[cpp]view plaincopymyTimer=[NSTimerscheduledTimerWithTimeInterval:1.5target:selfselector:@selector(scrollTimer)userInfo:nilrepeats:NO];//不重复... 阅读全文
posted @ 2014-10-25 16:29 banish 阅读(304) 评论(0) 推荐(0)
 
摘要: 1、声明NSTimer *timer;2、定义timer= [NSTimerscheduledTimerWithTimeInterval:1.0ftarget:selfselector:@selector(updateValue)userInfo:nilrepeats:YES];以下是调用函数... 阅读全文
posted @ 2014-10-25 16:27 banish 阅读(180) 评论(0) 推荐(0)