Created
July 27, 2016 22:08
-
-
Save bdalziel/fc04047116d10288a980cef445ad2ca6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (CGFloat)getSpacing:(ASPSpacingSize)size traitCollection:(UITraitCollection *)contextTraitCollection { | |
bool isCompact = !(contextTraitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular); | |
switch (size) { | |
case ASPSpacingSizeTiny : | |
return (isCompact) ? 8.0f : 16.0f; | |
case ASPSpacingSizeSmall : | |
return (isCompact) ? 16.0f : 24.0f; | |
case ASPSpacingSizeLarge : | |
return (isCompact) ? 24.0f : 48.0f; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment