Skip to content

Commit b5a701f

Browse files
authored
Merge pull request #186 from jondwillis/patch-1
Fixing keyboard visibility bug in WhistleFactory
2 parents 3c39eb4 + a0ac9a5 commit b5a701f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/WhistleFactory.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ open class WhistleFactory: UIViewController {
139139

140140
let initialOrigin = whistleWindow.frame.origin.y
141141
whistleWindow.frame.origin.y = initialOrigin - titleLabelHeight
142-
whistleWindow.makeKeyAndVisible()
142+
whistleWindow.isHidden = false
143143
UIView.animate(withDuration: 0.2, animations: {
144144
self.whistleWindow.frame.origin.y = initialOrigin
145145
})
@@ -151,7 +151,7 @@ open class WhistleFactory: UIViewController {
151151
self.whistleWindow.frame.origin.y = finalOrigin
152152
}, completion: { _ in
153153
if let window = self.previousKeyWindow {
154-
window.makeKeyAndVisible()
154+
window.isHidden = false
155155
self.whistleWindow.windowLevel = UIWindowLevelNormal - 1
156156
self.previousKeyWindow = nil
157157
window.rootViewController?.setNeedsStatusBarAppearanceUpdate()

0 commit comments

Comments
 (0)