-(void)initTimer { //时间间隔 NSTimeInterval timeInterval =3.0 ; //定时器 repeats 表示是否需要重复,NO为只重复一次 NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:timeInterval target:self selector:@selector(mobileAnimation) userInfo:nil repeats:YES]; }
转载于:https://www.cnblogs.com/qingjoin/archive/2012/07/12/2588569.html