SachK13 / SKActivityIndicatorView

A lightweight And Easy-To-Use ActivityIndicator For Your iOS App.
MIT License
66 stars 21 forks source link

Crash on ios 13 #10

Closed iosMaher closed 4 years ago

iosMaher commented 4 years ago

Crash on ios 13, window!.frame

Fix : in -> SKActivityIndicatorView.swift Replace ↓ Old: let delegate: UIApplicationDelegate = UIApplication.shared.delegate! if let windowObj = delegate.window { window = windowObj } else { window = UIApplication.shared.keyWindow! }

New: if let delegate = UIApplication.shared.delegate as? AppDelegate { if let windowObj = delegate.window { window = windowObj } else { window = UIApplication.shared.keyWindow! } }

Don't forget to add ↓ in AppDelegate var window: UIWindow?

YasmeenHelles commented 4 years ago

Use of undeclared type 'AppDelegate' :( Problem not solved

SachK13 commented 4 years ago

@iosMaher @YasmeenHelles This has been fixed in 1.0.0. and code has been updated to support iOS 13 and above with Swift 5.x+.