Skip to content

Commit

Permalink
- Fixed a compilation issue for swift version lesser than 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hackiftekhar committed Aug 1, 2019
1 parent 012ef1d commit 3f31c45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Demo/Objective_C_Demo/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6.4.0</string>
<string>6.4.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
2 changes: 1 addition & 1 deletion Demo/Swift_Demo/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>6.4.0</string>
<string>6.4.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
4 changes: 2 additions & 2 deletions IQKeyboardManagerSwift.podspec.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "IQKeyboardManagerSwift",
"version": "6.4.0",
"version": "6.4.1",
"source": {
"git": "https://github.com/hackiftekhar/IQKeyboardManager.git",
"tag": "v6.4.0"
"tag": "v6.4.1"
},
"summary": "Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView.",
"homepage": "https://github.com/hackiftekhar/IQKeyboardManager",
Expand Down
8 changes: 7 additions & 1 deletion IQKeyboardManagerSwift/IQKeyboardManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,13 @@ Codeless drop-in universal library allows to prevent issues of keyboard sliding
currentStatusBarOrientation = UIApplication.shared.statusBarOrientation
#endif

guard let statusBarOrientation = notification.userInfo?[UIApplication.statusBarOrientationUserInfoKey] as? Int, currentStatusBarOrientation.rawValue != statusBarOrientation else {
#if swift(>=4.2)
let statusBarUserInfoKey = UIApplication.statusBarOrientationUserInfoKey
#else
let statusBarUserInfoKey = UIApplicationStatusBarOrientationUserInfoKey
#endif

guard let statusBarOrientation = notification.userInfo?[statusBarUserInfoKey] as? Int, currentStatusBarOrientation.rawValue != statusBarOrientation else {
return
}

Expand Down

0 comments on commit 3f31c45

Please sign in to comment.