Search code examples
iosuiactivityviewcontrolleruiactivity

How to rearrange activities on a UIActivityViewController?


I'm using a UIActivityViewController, but I want to rearrange the order of the available activities. Right now it chooses what order to display them in, and has a bunch of them on a single scrollable line, and then more below a separator. Is it possible to rearrange the order these are displayed in, or to move some of them below the separator line?


Solution

  • You can't reorder the activities except for your custom activities. They will appear in the order you supply them. But they always come after the standard activities. You can specify which row the custom activities appear on. Your custom UIActivity should override the activityCategory method and return either UIActivityCategoryAction or UIActivityCategoryShare.