I just got this bug report for me app...the activity view controller is suddenly this weird narrow shape whether I'm on an actual phone or the view controller.
This is happening with some plain vanilla code that hasn't been touched in months:
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[message] applicationActivities:nil];
[self presentViewController:activityViewController animated:YES completion:nil];
What could be going wrong? I can't even think of where to start troubleshooting this one.
Have you tried reproducing this bug??? If we don't have the exact scenario of how this bug is getting created then we can't make a solution for it!!! Try updating the items in the array and check if the bug still exist... This type of things happens sometimes but until and unless we don't reproduce this scenario it can't be termed as bug.
Any way if you are working in universal app add below line of code before presenting the ActivityView
ActivityViewController.popoverPresentationController.sourceView = self.view;
[self presentViewController:activityViewController animated:YES completion:nil];
I will suggest, instead of looking for a solution dig out the problem first. I have never seen such weird behaviour of ActivityView before this and if we know why this happened then it will be helpful to every iOS developer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With