Skip to content

Commit

Permalink
Remove unsupported platform
Browse files Browse the repository at this point in the history
Adjust available support for tvOS
  • Loading branch information
dogo committed Oct 7, 2019
1 parent b1bf048 commit 40642d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "SketchKit",
platforms: [.iOS(.v9), .tvOS(.v9), .watchOS(.v2)],
platforms: [.iOS(.v9), .tvOS(.v9)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
Expand Down
1 change: 0 additions & 1 deletion SketchKit.podspec
Expand Up @@ -19,7 +19,6 @@ Pod::Spec.new do |s|

s.swift_versions = ['3.2', '4.0', '4.2', '5.0', '5.1']
s.ios.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'

s.source = { :git => 'https://github.com/dogo/SketchKit.git', :tag => s.version.to_s }
Expand Down
16 changes: 8 additions & 8 deletions Sources/SketchKit/Extensions/Anchors+SafeArea.swift
Expand Up @@ -11,56 +11,56 @@ import UIKit
public extension UIView {

var safeTopAnchor: NSLayoutYAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.topAnchor
}
return topAnchor
}

var safeBottomAnchor: NSLayoutYAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.bottomAnchor
}
return bottomAnchor
}

var safeLeadingAnchor: NSLayoutXAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.leadingAnchor
}
return leadingAnchor
}

var safeTrailingAnchor: NSLayoutXAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.trailingAnchor
}
return trailingAnchor
}

var safeCenterXAnchor: NSLayoutXAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.centerXAnchor
}
return centerXAnchor
}

var safeCenterYAnchor: NSLayoutYAxisAnchor {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.centerYAnchor
}
return centerYAnchor
}

var safeWidthAnchor: NSLayoutDimension {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.widthAnchor
}
return widthAnchor
}

var safeHeightAnchor: NSLayoutDimension {
if #available(iOS 11.0, *) {
if #available(iOS 11.0, tvOS 11.0, *) {
return safeAreaLayoutGuide.heightAnchor
}
return heightAnchor
Expand Down

0 comments on commit 40642d6

Please sign in to comment.