Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 26, 2021 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iosdevie/b04ceee7c9692c152ab344299216a057 to your computer and use it in GitHub Desktop.
Save iosdevie/b04ceee7c9692c152ab344299216a057 to your computer and use it in GitHub Desktop.
if let popoverPresentationController = actionSheet.popoverPresentationController {
popoverPresentationController.sourceView = self.view
popoverPresentationController.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0)
popoverPresentationController.permittedArrowDirections = []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment