Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created December 29, 2010 18:52
Show Gist options
  • Save thekarladam/758883 to your computer and use it in GitHub Desktop.
Save thekarladam/758883 to your computer and use it in GitHub Desktop.
CGFloat CGContextShadowOrientationYMultiplier() {
static CGFloat sharedMultiplier__ = 0.0;
if (sharedMultiplier__ == 0.0) {
// feel gross
CGFloat osVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
sharedMultiplier__ = (osVersion < 3.2f) ? 1.0 : -1.0;
}
return sharedMultiplier__;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment