解決presentViewController的延遲跳轉問題

解決方法:app

http://stackoverflow.com/questions/20087408/lag-between-viewwillappear-and-viewdidappearasync

說明跳轉到的控制器主線程負荷太大了,所以解決方法以下:spa

OtherCardViewController *card = [self.storyboard instantiateViewControllerWithIdentifier:@"OtherCard"];線程

        card.data=data;orm

        __block id copyself=self;get

        dispatch_async(dispatch_get_main_queue(), ^{it

            [copyself presentViewController:cardio

                                                   animated:YESqueue

                                                 completion:nil];方法

        });

相關文章
相關標籤/搜索