[Cocoa]_[初级]_[NSTimer在Cocoa中的应用,主要以多张图片切换的播放和停止]

[Cocoa]_[初级]_[NSTimer在Cocoa中的应用,主要以多张图片切换的播放和停止],第1张

概述主要说明NSTimer的具体实用。Creating a Timer+ scheduledTimerWithTimeInterval:invocation:repeats:+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:+ timerWithTimeInterval:invocation:repeat
主要说明NSTimer的具体实用。Creating a Timer+ scheduledTimerWithTimeInterval:invocation:repeats:+ scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:+ timerWithTimeInterval:invocation:repeats:+ timerWithTimeInterval:target:selector:userInfo:repeats:– initWithFireDate:interval:target:selector:userInfo:repeats:Firing a Timer– fireStopPing a Timer– invalIDateinformation About a Timer– isValID– fireDate– setFireDate:– timeInterval– userInfo-(IBAction) onPlay:(ID)sender{    if(timer == nil)    {        timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(checkThem:) userInfo:nil repeats:YES] ;    }    else    {        [timer invalIDate];        i = 0;        timer = nil;    }}-(voID) checkThem:(NSTimer *) aTimer{    NSLog(@"checkThem");       Nsstring *path =[paths objectAtIndex:i];//paths:deposit a lot of the imagefilePath     dosomething.....//主要是图片的显示,自定义view    ++i;    if((i+1) == [paths count])    {        i = 0;    } }
总结

以上是内存溢出为你收集整理的[Cocoa]_[初级]_[NSTimer在Cocoa中的应用,主要以多张图片切换播放停止]全部内容,希望文章能够帮你解决[Cocoa]_[初级]_[NSTimer在Cocoa中的应用,主要以多张图片切换的播放和停止]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1052364.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-25
下一篇2022-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存