Skip to content

Instantly share code, notes, and snippets.

@dmytro-anokhin
Created October 8, 2017 10:52
Show Gist options
  • Save dmytro-anokhin/659e84669599811871cc20ff25b2c6cc to your computer and use it in GitHub Desktop.
Save dmytro-anokhin/659e84669599811871cc20ff25b2c6cc to your computer and use it in GitHub Desktop.
private func leftColumnFrame(for availableSize: CGSize) -> CGRect {
switch traitCollection.layoutDirection {
case .unspecified, .leftToRight:
return CGRect(x: 0.0, y: 0.0, width: leftColumnWidth, height: size.height)
case .rightToLeft:
return CGRect(x: size.width — leftColumnWidth, y: 0.0, width: leftColumnWidth, height: size.height)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment