SLComposeViewController appears slowly

前端 未结 1 1435
滥情空心
滥情空心 2021-01-14 08:23

SLComposeViewController takes 3-4 seconds to appear after presenting it. But presentViewController:(UIViewController *) animated:(BOOL) completion:^(void)

相关标签:
1条回答
  • 2021-01-14 08:48

    So, this isn't a fix, but it might help you out. I couldn't get the thing to appear faster, I think its just the implementation pulling in data before displaying itself.

    Since the presentViewController completion executes almost instantly, my workaround was to display a progress view, and set a selector to execute after 2 seconds. The selector simply hides the progress view, here's an example.

    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    [self performSelector:@selector(hideProgressView) withObject:nil afterDelay:2.0f];
    
    [self presentViewController:self.composeViewController animated:YES completion:nil];
    
    
    - (void)hideProgressView
    {
        [MBProgressHUD hideHUDForView:self.view animated:YES];
    }
    
    0 讨论(0)
提交回复
热议问题