Skip to content

Commit 5139bb8

Browse files
authored
Merge pull request #15 from thomas-sivilay/master
Added support of Swift 4.2
2 parents f26140f + d73f076 commit 5139bb8

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

KeyboardLayoutGuide/KeyboardLayoutGuide.xcodeproj/project.pbxproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,12 @@
151151
TargetAttributes = {
152152
9902DE0A1FBB24A5009E0D48 = {
153153
CreatedOnToolsVersion = 9.0;
154-
LastSwiftMigration = 0900;
154+
LastSwiftMigration = 1000;
155155
ProvisioningStyle = Automatic;
156156
};
157157
9902DE131FBB24A5009E0D48 = {
158158
CreatedOnToolsVersion = 9.0;
159+
LastSwiftMigration = 1000;
159160
ProvisioningStyle = Automatic;
160161
};
161162
};
@@ -354,7 +355,7 @@
354355
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
355356
SKIP_INSTALL = YES;
356357
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
357-
SWIFT_VERSION = 4.0;
358+
SWIFT_VERSION = 4.2;
358359
TARGETED_DEVICE_FAMILY = "1,2";
359360
};
360361
name = Debug;
@@ -376,7 +377,7 @@
376377
PRODUCT_BUNDLE_IDENTIFIER = com.freshos.KeyboardLayoutGuide;
377378
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
378379
SKIP_INSTALL = YES;
379-
SWIFT_VERSION = 4.0;
380+
SWIFT_VERSION = 4.2;
380381
TARGETED_DEVICE_FAMILY = "1,2";
381382
};
382383
name = Release;
@@ -390,7 +391,7 @@
390391
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
391392
PRODUCT_BUNDLE_IDENTIFIER = com.freshos.KeyboardLayoutGuideTests;
392393
PRODUCT_NAME = "$(TARGET_NAME)";
393-
SWIFT_VERSION = 4.0;
394+
SWIFT_VERSION = 4.2;
394395
TARGETED_DEVICE_FAMILY = "1,2";
395396
};
396397
name = Debug;
@@ -404,7 +405,7 @@
404405
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
405406
PRODUCT_BUNDLE_IDENTIFIER = com.freshos.KeyboardLayoutGuideTests;
406407
PRODUCT_NAME = "$(TARGET_NAME)";
407-
SWIFT_VERSION = 4.0;
408+
SWIFT_VERSION = 4.2;
408409
TARGETED_DEVICE_FAMILY = "1,2";
409410
};
410411
name = Release;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

KeyboardLayoutGuide/KeyboardLayoutGuide/Keyboard+LayoutGuide.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ open class KeyboardLayoutGuide: UILayoutGuide {
4848
let nc = NotificationCenter.default
4949
nc.addObserver(self,
5050
selector: #selector(keyboardWillChangeFrame(_:)),
51-
name: .UIKeyboardWillChangeFrame,
51+
name: UIResponder.keyboardWillChangeFrameNotification,
5252
object: nil)
5353
}
5454

@@ -113,7 +113,7 @@ extension UILayoutGuide {
113113

114114
extension Notification {
115115
var keyboardHeight: CGFloat? {
116-
guard let v = userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue else {
116+
guard let v = userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else {
117117
return nil
118118
}
119119
// Weirdly enough UIKeyboardFrameEndUserInfoKey doesn't have the same behaviour
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)