0

I am new to ios and I have a problem on displaying UIActivityViewController. I have done the code and it works fine on ios8&9 iPad, but when I tested on ios10 iPad 5th and the UIActivityViewController frame was restricted by its parent view controller.

Problem need to be fixed: Test on ios10 ipad5

The desired layout:

Test on ios8&9

UIActivityViewController *vc = [[UIActivityViewController alloc]initWithActivityItems:activityItems applicationActivities:nil];

vc.excludedActivityTypes = @[UIActivityTypeMessage];
vc.popoverPresentationController.barButtonItem = self.shareButton;
    vc.popoverPresentationController.permittedArrowDirections = 
UIPopoverArrowDirectionAny;
    vc.popoverPresentationController.delegate = self;
    vc.modalPresentationStyle = UIModalPresentationPopover;

Can anyone give me some hints on that? Thanks in advance.

Janice Zhan
  • 571
  • 1
  • 5
  • 18

0 Answers0