Skip to content

Instantly share code, notes, and snippets.

@ozgurodabasi
Created December 4, 2018 21:39
Show Gist options
  • Save ozgurodabasi/b0dec495895b7d1944eacf248ecec819 to your computer and use it in GitHub Desktop.
Save ozgurodabasi/b0dec495895b7d1944eacf248ecec819 to your computer and use it in GitHub Desktop.
import UIKit
struct ScreenSize {
static let bounds: CGRect = UIScreen.main.bounds
static let width: CGFloat = UIScreen.main.bounds.size.width
static let height: CGFloat = UIScreen.main.bounds.size.height
static let maxLength: CGFloat = max(ScreenSize.width, ScreenSize.height)
static let minLength: CGFloat = min(ScreenSize.width, ScreenSize.height)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment