Skip to content

Commit 7cf2835

Browse files
committed
Builds with Xcode 11 & Swift 5.1 (1.5.0)
1 parent eb08739 commit 7cf2835

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

Keyboard+LayoutGuide.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Keyboard+LayoutGuide'
3-
s.version = "1.4.2"
3+
s.version = "1.5.0"
44
s.summary = "Apple's missing KeyboardLayoutGuide"
55
s.homepage = "https://github.com/freshOS/KeyboardLayoutGuide"
66
s.license = { :type => "MIT", :file => "LICENSE" }
@@ -13,5 +13,5 @@ Pod::Spec.new do |s|
1313
s.ios.deployment_target = "9"
1414
s.description = "An alternative approach to handling keyboard in iOS with Autolayout"
1515
s.module_name = 'KeyboardLayoutGuide'
16-
s.swift_versions = ['4', '4.1', '4.2', '5.0']
16+
s.swift_versions = ['4', '4.1', '4.2', '5.0', '5.1']
1717
end

KeyboardLayoutGuide.framework.zip

1.47 MB
Binary file not shown.

KeyboardLayoutGuide/KeyboardLayoutGuide.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@
380380
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
381381
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
382382
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
383+
MARKETING_VERSION = 1.5.0;
383384
PRODUCT_BUNDLE_IDENTIFIER = com.freshos.KeyboardLayoutGuide;
384385
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
385386
SKIP_INSTALL = YES;
@@ -402,6 +403,7 @@
402403
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
403404
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
404405
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
406+
MARKETING_VERSION = 1.5.0;
405407
PRODUCT_BUNDLE_IDENTIFIER = com.freshos.KeyboardLayoutGuide;
406408
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
407409
SKIP_INSTALL = YES;

KeyboardLayoutGuide/KeyboardLayoutGuide/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.4.2</string>
18+
<string>$(MARKETING_VERSION)</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

KeyboardLayoutGuide/KeyboardLayoutGuide/Keyboard+LayoutGuide.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
private class Keyboard {
11+
internal class Keyboard {
1212
static let shared = Keyboard()
1313
var currentHeight: CGFloat = 0
1414
}
@@ -17,7 +17,7 @@ extension UIView {
1717
private enum AssociatedKeys {
1818
static var keyboardLayoutGuide = "keyboardLayoutGuide"
1919
}
20-
20+
2121
/// A layout guide representing the inset for the keyboard.
2222
/// Use this layout guide’s top anchor to create constraints pinning to the top of the keyboard.
2323
public var keyboardLayoutGuide: KeyboardLayoutGuide {
@@ -38,14 +38,14 @@ open class KeyboardLayoutGuide: UILayoutGuide {
3838
updateButtomAnchor()
3939
}
4040
}
41-
41+
4242
private var bottomConstraint: NSLayoutConstraint?
43-
43+
4444
@available(*, unavailable)
4545
public required init?(coder aDecoder: NSCoder) {
4646
fatalError("init(coder:) has not been implemented")
4747
}
48-
48+
4949
public init(notificationCenter: NotificationCenter = NotificationCenter.default) {
5050
super.init()
5151
// Observe keyboardWillChangeFrame notifications
@@ -56,7 +56,7 @@ open class KeyboardLayoutGuide: UILayoutGuide {
5656
object: nil
5757
)
5858
}
59-
59+
6060
internal func setUp() {
6161
guard let view = owningView else { return }
6262
NSLayoutConstraint.activate(
@@ -68,25 +68,25 @@ open class KeyboardLayoutGuide: UILayoutGuide {
6868
)
6969
updateButtomAnchor()
7070
}
71-
71+
7272
func updateButtomAnchor() {
7373
if let bottomConstraint = bottomConstraint {
7474
bottomConstraint.isActive = false
7575
}
76-
76+
7777
guard let view = owningView else { return }
78-
78+
7979
let viewBottomAnchor: NSLayoutYAxisAnchor
8080
if #available(iOS 11.0, *), usesSafeArea {
8181
viewBottomAnchor = view.safeAreaLayoutGuide.bottomAnchor
8282
} else {
8383
viewBottomAnchor = view.bottomAnchor
8484
}
85-
85+
8686
bottomConstraint = bottomAnchor.constraint(equalTo: viewBottomAnchor)
8787
bottomConstraint?.isActive = true
8888
}
89-
89+
9090
@objc
9191
private func keyboardWillChangeFrame(_ note: Notification) {
9292
if var height = note.keyboardHeight {
@@ -98,7 +98,7 @@ open class KeyboardLayoutGuide: UILayoutGuide {
9898
Keyboard.shared.currentHeight = height
9999
}
100100
}
101-
101+
102102
private func animate(_ note: Notification) {
103103
if
104104
let owningView = self.owningView,

0 commit comments

Comments
 (0)