Skip to content

Commit

Permalink
Merge pull request #186 from jondwillis/patch-1
Browse files Browse the repository at this point in the history
Fixing keyboard visibility bug in WhistleFactory
  • Loading branch information
onmyway133 authored Oct 30, 2017
2 parents 3c39eb4 + a0ac9a5 commit b5a701f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WhistleFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ open class WhistleFactory: UIViewController {

let initialOrigin = whistleWindow.frame.origin.y
whistleWindow.frame.origin.y = initialOrigin - titleLabelHeight
whistleWindow.makeKeyAndVisible()
whistleWindow.isHidden = false
UIView.animate(withDuration: 0.2, animations: {
self.whistleWindow.frame.origin.y = initialOrigin
})
Expand All @@ -151,7 +151,7 @@ open class WhistleFactory: UIViewController {
self.whistleWindow.frame.origin.y = finalOrigin
}, completion: { _ in
if let window = self.previousKeyWindow {
window.makeKeyAndVisible()
window.isHidden = false
self.whistleWindow.windowLevel = UIWindowLevelNormal - 1
self.previousKeyWindow = nil
window.rootViewController?.setNeedsStatusBarAppearanceUpdate()
Expand Down

0 comments on commit b5a701f

Please sign in to comment.