Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// This
public indirect enum BrickDimension {
case Ratio(ratio: CGFloat)
case Fixed(size: CGFloat)
case Fill
case Auto(estimate: BrickDimension)
case Orientation(landscape: BrickDimension, portrait: BrickDimension)
case HorizontalSizeClass(regular: BrickDimension, compact: BrickDimension)
case VerticalSizeClass(regular: BrickDimension, compact: BrickDimension)
}
// Could be replaced with
public enum BrickSizeClass {
case Auto(estimate: BrickDimension)
case Orientation(landscape: BrickDimension, portrait: BrickDimension)
case HorizontalSizeClass(regular: BrickDimension, compact: BrickDimension)
case VerticalSizeClass(regular: BrickDimension, compact: BrickDimension)
}
public enum BrickDimension {
case Ratio(ratio: CGFloat)
case Fixed(size: CGFloat)
case Fill
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment