Skip to content

Commit

Permalink
Changed default window to key window for present.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Jun 13, 2021
1 parent 6cab245 commit e1b93aa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Binary file not shown.
4 changes: 1 addition & 3 deletions SPAlert.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
Pod::Spec.new do |s|

s.name = 'SPAlert'
s.version = '3.1.0'
s.version = '3.1.1'
s.summary = 'Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.'
s.homepage = 'https://github.com/ivanvorobei/SPAlert'
s.source = { :git => 'https://github.com/ivanvorobei/SPAlert.git', :tag => s.version }
s.license = { :type => "MIT", :file => "LICENSE" }

s.author = { 'Ivan Vorobei' => '[email protected]' }
s.social_media_url = 'https://ivanvorobei.by/'

s.swift_version = '5.1'
s.ios.deployment_target = '12.0'
Expand Down
2 changes: 1 addition & 1 deletion Sources/SPAlert/SPAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ open class SPAlertView: UIView {
open func present(duration: TimeInterval = 1.5, haptic: SPAlertHaptic = .success, completion: (() -> Void)? = nil) {

if self.presentWindow == nil {
self.presentWindow = UIApplication.shared.windows.first
self.presentWindow = UIApplication.shared.keyWindow
}

guard let window = self.presentWindow else { return }
Expand Down

0 comments on commit e1b93aa

Please sign in to comment.