0

Basically I was forced to check if the iOS version of the device is 8.0 and if it is an iPad to run the following code:

ActivityView.popoverPresentationController.sourceView = view;
ActivityView.popoverPresentationController.sourceRect = CGRectMake(0, 50, 1, 1);

Otherwise the application crashes.

The problem now is it crashes in iPad Mini.

diogo.appDev
  • 1,595
  • 5
  • 16
  • 30

1 Answers1

0

Basically, instead of checking for iOS 8 and iPad, I should check if the activityView responds to the selector popoverPresentationController.

[ActivityView respondsToSelector:@selector(popoverPresentationController)] ) {
    ActivityView.popoverPresentationController.sourceView = view;
    ActivityView.popoverPresentationController.sourceRect = CGRectMake(0, 50, 1, 1);
}
diogo.appDev
  • 1,595
  • 5
  • 16
  • 30