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?

有帮助吗?

解决方案

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.

其他提示

UIActivityViewController doesn't currently provide any mechanism for specifying the order of the available activities, nor does it provide the ability to specify which appear above and below the separator.

There are third party alternatives to UIActivityViewController, such as REActivityViewController, that provide more customization options, but I don't believe it's been updated for iOS 7 yet.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top