How to rearrange activities on a UIActivityViewController?

懵懂的女人 提交于 2019-12-11 00:47:52

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/19060535/how-to-rearrange-activities-on-a-uiactivityviewcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!