Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #18 from manjirimoghe/master
Browse files Browse the repository at this point in the history
swift5 changes
  • Loading branch information
manjirimoghe authored Jun 6, 2019
2 parents c251fa9 + ee66eb5 commit 03ac9f0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions GTHalfSheet/GTSheet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
TargetAttributes = {
6FB0B4D61F75845600A4F6D4 = {
CreatedOnToolsVersion = 9.0;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
Expand Down Expand Up @@ -351,7 +351,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -375,7 +375,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public class HalfSheetPresentationManager: NSObject, UIGestureRecognizerDelegate
public override init() {
super.init()

NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationWillResignActive, object: nil, queue: OperationQueue.main) { [weak self] _ in
NotificationCenter.default.addObserver(forName: UIApplication.willResignActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] _ in
self?.unlinkDisplay()
}

NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationDidBecomeActive, object: nil, queue: OperationQueue.main) { [weak self] _ in
NotificationCenter.default.addObserver(forName: UIApplication.didBecomeActiveNotification, object: nil, queue: OperationQueue.main) { [weak self] _ in
self?.linkDisplay()
}

Expand Down Expand Up @@ -237,7 +237,7 @@ extension HalfSheetPresentationManager {
copyPresentingViewToTransitionContext(afterScreenUpdate: true)
displayLink?.invalidate()
displayLink = UIScreen.main.displayLink(withTarget: self, selector: #selector(HalfSheetPresentationManager.displayDidRefresh(_:)))
displayLink?.add(to: .main, forMode: .defaultRunLoopMode)
displayLink?.add(to: .main, forMode: RunLoop.Mode.default)
}

@objc private func displayDidRefresh(_ displayLink: CADisplayLink) {
Expand Down
2 changes: 1 addition & 1 deletion GTHalfSheet/GTSheet/Utilities/AnimatorConvenience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation

protocol AnimatorConvenience {
weak var manager: HalfSheetPresentationManager? { get }
var manager: HalfSheetPresentationManager? { get }
}

extension AnimatorConvenience {
Expand Down
2 changes: 1 addition & 1 deletion GTHalfSheet/GTSheet/Utilities/Protocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ internal extension Array where Element == DismissMethod {
}

public protocol HalfSheetPresentableProtocol: class {
weak var managedScrollView: UIScrollView? { get }
var managedScrollView: UIScrollView? { get }
var dismissMethod: [DismissMethod] { get }
var sheetHeight: CGFloat? { get }
}
Expand Down

0 comments on commit 03ac9f0

Please sign in to comment.