Skip to content

Commit e1b93aa

Browse files
committed
Changed default window to key window for present.
1 parent 6cab245 commit e1b93aa

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

SPAlert.podspec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SPAlert'
4-
s.version = '3.1.0'
4+
s.version = '3.1.1'
55
s.summary = 'Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.'
66
s.homepage = 'https://github.com/ivanvorobei/SPAlert'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPAlert.git', :tag => s.version }
88
s.license = { :type => "MIT", :file => "LICENSE" }
9-
109
s.author = { 'Ivan Vorobei' => '[email protected]' }
11-
s.social_media_url = 'https://ivanvorobei.by/'
1210

1311
s.swift_version = '5.1'
1412
s.ios.deployment_target = '12.0'

Sources/SPAlert/SPAlertView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ open class SPAlertView: UIView {
159159
open func present(duration: TimeInterval = 1.5, haptic: SPAlertHaptic = .success, completion: (() -> Void)? = nil) {
160160

161161
if self.presentWindow == nil {
162-
self.presentWindow = UIApplication.shared.windows.first
162+
self.presentWindow = UIApplication.shared.keyWindow
163163
}
164164

165165
guard let window = self.presentWindow else { return }

0 commit comments

Comments
 (0)