Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. + (CGFloat)getSpacing:(ASPSpacingSize)size traitCollection:(UITraitCollection *)contextTraitCollection {
  2. bool isCompact = !(contextTraitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular);
  3. switch (size) {
  4. case ASPSpacingSizeTiny :
  5. return (isCompact) ? 8.0f : 16.0f;
  6. case ASPSpacingSizeSmall :
  7. return (isCompact) ? 16.0f : 24.0f;
  8. case ASPSpacingSizeLarge :
  9. return (isCompact) ? 24.0f : 48.0f;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement