- (void)viewDidLoad { [super viewDidLoad]; NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(run) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:UITrackingRunLoopMode]; } - (void)run { NSLog(@"-----run"); }
理论上应该在滚动视图执行定时器,但并没有实现效果,求指教!