UITableView and presentViewController takes 2 clicks to display

前端 未结 8 1594
独厮守ぢ
独厮守ぢ 2020-12-13 18:34

I am using a UITableView to present a variety of viewControllers. Depending on which index is clicked, it will present a different view controller, which can then be dismis

8条回答
  •  情歌与酒
    2020-12-13 19:13

    Check this out: https://devforums.apple.com/thread/201431 If you don't want to read it all - the solution for some people (including me) was to make the presentViewController call explicitly on the main thread:

    dispatch_async(dispatch_get_main_queue(), ^{
        [self presentViewController:myVC animated:YES completion:nil];
    });
    

    Probably iOS7 is messing up the threads in didSelectRowAtIndexPath.

提交回复
热议问题