Skip to content

Commit

Permalink
Merge pull request #3 from Asana/steve/xcode-15
Browse files Browse the repository at this point in the history
Fix issues related to Xcode 15
  • Loading branch information
stevelandeyasana authored Jun 7, 2023
2 parents 2442f6c + a103092 commit b432426
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 29 deletions.
4 changes: 2 additions & 2 deletions FittedSheets.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = FittedSheets/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -754,7 +754,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = FittedSheets/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
6 changes: 3 additions & 3 deletions FittedSheets/Compatible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

extension UIView {
open var compatibleSafeAreaInsets: UIEdgeInsets {
public var compatibleSafeAreaInsets: UIEdgeInsets {
if #available(iOS 11.0, *) {
return self.safeAreaInsets
} else {
Expand All @@ -19,7 +19,7 @@ extension UIView {
}

extension CALayer {
open var compatibleMaskedCorners: CACornerMask {
public var compatibleMaskedCorners: CACornerMask {
get {
if #available(iOS 11.0, *) {
return self.maskedCorners
Expand All @@ -36,7 +36,7 @@ extension CALayer {
}

extension UIViewController {
open var compatibleAdditionalSafeAreaInsets: UIEdgeInsets {
public var compatibleAdditionalSafeAreaInsets: UIEdgeInsets {
get {
if #available(iOS 11.0, *) {
return self.additionalSafeAreaInsets
Expand Down
17 changes: 0 additions & 17 deletions FittedSheets/SheetOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@ public struct SheetOptions {

public var horizontalPadding: CGFloat = 0
public var maxWidth: CGFloat?

/* These properties will be removed in an upcoming release, leaving them for now so people can transition slowly */

@available(*, unavailable, message: "minimumSpaceAbovePullBar is now a property on SheetViewController")
public var minimumSpaceAbovePullBar: CGFloat = 0

@available(*, unavailable, message: "gripSize is now a property on SheetViewController")
public var gripSize: CGSize = .zero

@available(*, unavailable, message: "gripColor is now a property on SheetViewController")
public var gripColor: UIColor = .white

@available(*, unavailable, message: "pullBarBackgroundColor is now a property on SheetViewController")
public var pullBarBackgroundColor: UIColor = UIColor.clear

@available(*, unavailable, message: "cornerRadius is now a property on SheetViewController")
public var cornerRadius: CGFloat = 0

public var isRubberBandEnabled: Bool = false

Expand Down
8 changes: 4 additions & 4 deletions FittedSheets/Yalta.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func * <Type, Axis>(anchor: Anchor<Type, Axis>, multiplier: CGFloat) -> Anchor<T

extension Anchor where Type: AnchorType.Alignment {
/// Aligns two anchors.
@discardableResult func align<Type: AnchorType.Alignment>(with anchor: Anchor<Type, Axis>, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
@discardableResult func align(with anchor: Anchor<Type, Axis>, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
return Constraints.constrain(self, anchor, relation: relation)
}
}
Expand Down Expand Up @@ -188,7 +188,7 @@ extension Anchor where Type: AnchorType.Dimension {
return Constraints.constrain(item: item, attribute: attribute, relatedBy: relation, constant: constant)
}

@discardableResult func match<Axis>(_ anchor: Anchor<AnchorType.Dimension, Axis>, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
@discardableResult func match(_ anchor: Anchor<AnchorType.Dimension, Axis>, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
return Constraints.constrain(self, anchor, relation: relation)
}
}
Expand Down Expand Up @@ -405,14 +405,14 @@ internal extension UIEdgeInsets {

extension Anchor where Type: AnchorType.Alignment {
@available(*, deprecated, message: "Please use operators instead, e.g. `view.top.align(with: view.bottom * 2 + 10)`.")
@discardableResult func align<Type: AnchorType.Alignment>(with anchor: Anchor<Type, Axis>, offset: CGFloat = 0, multiplier: CGFloat = 1, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
@discardableResult func align(with anchor: Anchor<Type, Axis>, offset: CGFloat = 0, multiplier: CGFloat = 1, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
return Constraints.constrain(self, anchor, offset: offset, multiplier: multiplier, relation: relation)
}
}

extension Anchor where Type: AnchorType.Dimension {
@available(*, deprecated, message: "Please use operators instead, e.g. `view.width.match(view.height * 2 + 10)`.")
@discardableResult func match<Axis>(_ anchor: Anchor<AnchorType.Dimension, Axis>, offset: CGFloat = 0, multiplier: CGFloat = 1, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
@discardableResult func match(_ anchor: Anchor<AnchorType.Dimension, Axis>, offset: CGFloat = 0, multiplier: CGFloat = 1, relation: NSLayoutConstraint.Relation = .equal) -> NSLayoutConstraint {
return Constraints.constrain(self, anchor, offset: offset, multiplier: multiplier, relation: relation)
}
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Bottom sheets for iOS
<!-- ![Bitrise Status](https://app.bitrise.io/app/13f283bd401bbe1c.svg?token=MGSP3TGNYPSgB5gWq4MEQg) -->

Minimum requirement:
![iOSVersion](https://img.shields.io/badge/iOS-11-green.svg)
![SwiftVersion](https://img.shields.io/badge/Swift-5-green.svg)
![XcodeVersion](https://img.shields.io/badge/Xcode-11-green.svg)
![iOSVersion](https://img.shields.io/badge/iOS-14-green.svg)
![SwiftVersion](https://img.shields.io/badge/Swift-5-green.svg)
![XcodeVersion](https://img.shields.io/badge/Xcode-14-green.svg)

## About
This project is to enable easily presenting view controllers in a bottom sheet that supports scrollviews and multiple sizes. Contributions and feedback are very welcome.
Expand Down

0 comments on commit b432426

Please sign in to comment.