search

Home  >  Q&A  >  body text

objective-c - iOS线程问题 GCD

在表格视图头部添加一个滚动视图,随之NSTimer的刷新不断滚动,但是怎么实现在拖拽住表格时,滚动视图依旧滚动,而不会停止下来????

高洛峰高洛峰2889 days ago272

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 09:21:25

        NSTimer *timer = [NSTimer timerWithTimeInterval:1.f
                                                 target:self
                                               selector:@selector(onTimer:)
                                               userInfo:nil
                                                repeats:YES];
        [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];

    NSRunLoopCommonModes is the key

    reply
    0
  • Cancelreply