2

I am trying to present SLComposerViewController with service type Twitter. It is taking 5 to 6 second to present the twitter composer view. Once it presented, next time onwards the delay to present twitter view reducing gradually. Here is my code

dispatch_async(dispatch_get_main_queue(), ^{

    if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
    {
        SLComposeViewController *tweet = [SLComposeViewController
                                          composeViewControllerForServiceType:SLServiceTypeTwitter];
        [tweet setInitialText:initialText];

        [myViewController presentViewController:tweet animated:YES completion:nil];
    }
});

Any help would be appreciated :)

Thanks.

Augustine P A
  • 5,008
  • 3
  • 35
  • 39
  • see this link may be helps with you http://stackoverflow.com/questions/13519904/how-to-make-the-presentviewcontroller-with-slcomposeviewcontroller-faster – Anbu.Karthik Sep 09 '15 at 06:24
  • @Anbu.Karthik no luck :( – Augustine P A Sep 09 '15 at 06:39
  • in first time only u face this issue or else faced in every time , if you are facing in first time is not a problem , bz already u threads has run in main , SL composer also run in main thread, so the queue taken some delay to present , the topic already discussed in developer fourms. – Anbu.Karthik Sep 09 '15 at 06:45
  • @Anbu.Karthik - Yes first time its taking time. There is no option to convey user that action is going on. I have added loading indicator to show the activity, but it get removed in a fraction of second and again it took 5-6 seconds to populate the composer. I sub classed the SLComposer and in viewdidappear I tried to remove the loading indicator. But no luck viewdidappear getting called in a second and again its taking 5-6 seconds to populate the composer view. – Augustine P A Sep 09 '15 at 07:08
  • in my knowledge there is no other way, if you get the answer please inform me , – Anbu.Karthik Sep 09 '15 at 07:11
  • Here's a workaround that might help you: http://stackoverflow.com/a/38964293/1322108 – nenchev Aug 15 '16 at 23:08

0 Answers0