如何重新排列 UIActivityViewController 上的活动? [英] How to rearrange activities on a UIActivityViewController?
问题描述
我正在使用 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?
推荐答案
除了自定义活动之外,您无法对活动重新排序.它们会按照您提供的顺序出现.但它们总是在标准活动之后出现.您可以指定自定义活动出现在哪一行.您的自定义 UIActivity
应覆盖 activityCategory
方法并返回 UIActivityCategoryAction
或 UIActivityCategoryShare
.
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 上的活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!