Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- + (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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement