Skip to content

Instantly share code, notes, and snippets.

@claybridges
Last active Jul 10, 2018
Embed
What would you like to do?
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;
}
@skywinder
Copy link

skywinder commented Sep 17, 2014

Thanks.
Is it really no native methods to check it?

@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