Skip to content

Instantly share code, notes, and snippets.

@claybridges
Last active October 10, 2023 14:26
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claybridges/6029091 to your computer and use it in GitHub Desktop.
Save claybridges/6029091 to your computer and use it in GitHub Desktop.
UIInterfaceOrientationMask vs. UIInterfaceOrientation. As far as I know, a function like this isn't available in the API. I derived this from the enum def for UIInterfaceOrientationMask.
// UIInterfaceOrientationMask vs. UIInterfaceOrientation
// As far as I know, a function like this isn't available in the API. I derived this from the enum def for
// UIInterfaceOrientationMask.
inline BOOL OrientationMaskSupportsOrientation(UIInterfaceOrientationMask mask, UIInterfaceOrientation orientation) {
return (mask & (1 << orientation)) != 0;
}
@hlung
Copy link

hlung commented Aug 15, 2017

It's so funny that Apple doesn't provide this API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment