0

I was wondering if you can remove the mail option from the share menu in a QLPreviewController? I have searched up and down the documentation but couldnt find anything.

Tom Fobear
  • 6,729
  • 7
  • 42
  • 74

1 Answers1

1

All you can do is remove the share button completely via viewDidAppear:

[self.navigationItem setRightBarButtonItem:nil];

Then you can create your own button that handles its on UIActivityViewController items with different activities that exclude mail.

See something like this for more info on creating that: https://www.captechconsulting.com/blog/steven-beyers/cocoaconf-dc-recap-sharing-uiactivityviewcontroller

valheru
  • 2,552
  • 3
  • 20
  • 40
  • I've had it work just fine in 6 and 7. Your controller HAS to be in a navigationcontroller, however – valheru Jan 14 '14 at 07:09
  • are you sure? afaik, in iOS7 it is now a remote view controller called via XPC – dwery Jan 16 '14 at 12:20
  • Yes I'm sure. You just have to do it in viewDidAppear (after all of their work has been done). It's a stacking thing....so if you try to do it earlier, it will not work. – valheru Jan 16 '14 at 14:26
  • I also managed to achieve this on iOS 7.1. It won't work if you don't call [super viewDidAppear] first. – Despotovic Mar 28 '14 at 17:44