Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Created October 8, 2017 10:47
Show Gist options
  • Save dmytro-anokhin/5cdb5bddbddc81563dbf851eba8a3552 to your computer and use it in GitHub Desktop.
Save dmytro-anokhin/5cdb5bddbddc81563dbf851eba8a3552 to your computer and use it in GitHub Desktop.
/// Suggests display mode based on trait collection
private func suggestDisplayMode(for traitCollection: UITraitCollection) -> DisplayMode {
return traitCollection.horizontalSizeClass == .regular ? .sideBySide : .one
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment