Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIActivityViewController freeze in first time

Tags:

ios

iphone

ios6

When I call the first time UIActivityViewController, the interaction is locked. After the first click it will be normal without locking interaction, does anyone know how to not catch the first time?

like image 919
viniciusmo Avatar asked Sep 13 '13 17:09

viniciusmo


1 Answers

Maybe this can help. I had a similar issue, UIActivityViewController was pretty slow to appear the first time.

I solved it removing AirDrop from the supported activity types (through excludedActivityTypes) and it became super fast. So if you are not interested in AirDrop (my case) you can do something like this:

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
    activityVC.excludedActivityTypes = @[UIActivityTypeAirDrop];
}

Note that UIActivityTypeAirDrop is only available starting from iOS 7.0.

like image 120
Fmessina Avatar answered Sep 17 '22 11:09

Fmessina