美文网首页
cell上模态弹出时响应延迟presentViewControl

cell上模态弹出时响应延迟presentViewControl

作者: 我的马里奥兄弟 | 来源:发表于2017-04-05 13:54 被阅读95次

在tableView的代理方法didSelectRowAtIndexPath中,执行模态到下一页的动画时,出现响应延迟的问题。需要点击两次才能跳转。

这是由于线程问题引起的,需要把模态跳转到的方法放到主线程中执行。

dispatch_async(dispatch_get_main_queue(), ^{

         ScheduleSettingController *scheVC = [ScheduleSettingController new];

        [self presentViewController:scheVC animated:YES completion:^{

              DDLogInfo(@"点击cell修改档期");

        }];

});

相关文章

网友评论

      本文标题:cell上模态弹出时响应延迟presentViewControl

      本文链接:https://www.haomeiwen.com/subject/nlntattx.html