Skip to content

Commit bf3ccd4

Browse files
committed
Cleanup
1 parent 3dbe4ee commit bf3ccd4

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

Sources/GreenAlert/UIAlertController+Extensions.swift

+1-16
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,7 @@ public extension UIAlertController {
240240
}
241241
}
242242

243-
// TODO: either import EZSE or migrate away
244-
public extension UIApplication {
245-
/// EZSE: Run a block in background after app resigns activity
246-
func runInBackground(_ closure: @escaping () -> Void, expirationHandler: (() -> Void)? = nil) {
247-
DispatchQueue.main.async {
248-
let taskID: UIBackgroundTaskIdentifier
249-
if let expirationHandler = expirationHandler {
250-
taskID = self.beginBackgroundTask(expirationHandler: expirationHandler)
251-
} else {
252-
taskID = self.beginBackgroundTask(expirationHandler: { })
253-
}
254-
closure()
255-
self.endBackgroundTask(taskID)
256-
}
257-
}
258-
243+
fileprivate extension UIApplication {
259244
/// EZSE: Get the top most view controller from the base view controller; default param is UIWindow's rootViewController
260245
class func topViewController(_ base: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController? {
261246
if let nav = base as? UINavigationController {

0 commit comments

Comments
 (0)