问题
Is there anyway to remove the bottom part from UIActivityViewController?
also - Is there anyway to remove the MORE icon from UIActivityViewController?
thanks
回答1:
In iOS 8.2, UIActivityViewController shows only a single row for UIActivityCategoryShare activity types if we do not provide any custom UIActivity.
In iOS 8.3 onwards, UIActivityViewController shows two lines whether you provide your own custom UIActivity or not.
Below are the screenshots for both:
For iOS 8.2
For iOS 9.0
This is how Apple has designed the UIActivityViewController. You can provide custom functions but not custom user interface in UIActivityViewController.
回答2:
I think its not possible to remove the bottom part .... However we can remove the unwanted icons using excludedActivityTypes property of UIActivityViewController object. Try this
UIActivityViewController *vc = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
vc.excludedActivityTypes = @[UIActivityTypePostToWeibo,UIActivityTypePrint,UIActivityTypeAssignToContact,UIActivityTypeCopyToPasteboard,UIActivityTypeSaveToCameraRoll,UIActivityTypePostToTwitter,UIActivityTypeMail];
来源:https://stackoverflow.com/questions/31423589/uiactivityviewcontroller-remove-bottom-part