Skip to content

Commit

Permalink
fix macOS error, move extension to Platform+CoreGraphics
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxuan30 committed Mar 30, 2020
1 parent 219e67e commit 04555a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
15 changes: 15 additions & 0 deletions Source/Charts/Utils/Platform+Graphics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
// https://github.com/danielgindi/Charts
//

enum Orientation
{
case portrait, landscape
}

extension CGSize
{
var orientation: Orientation { return width > height ? .landscape : .portrait }
}

extension CGRect
{
var orientation: Orientation { size.orientation }
}

// MARK: - UIKit
#if canImport(UIKit)
import UIKit
Expand Down
15 changes: 0 additions & 15 deletions Source/Charts/Utils/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,6 @@ extension UIScreen
}
}

enum Orientation
{
case portrait, landscape
}

extension CGSize
{
var orientation: Orientation { return width > height ? .landscape : .portrait }
}

extension CGRect
{
var orientation: Orientation { size.orientation }
}

func NSUIMainScreen() -> NSUIScreen?
{
return NSUIScreen.main
Expand Down

0 comments on commit 04555a7

Please sign in to comment.