Skip to content

Commit

Permalink
Add computed window property to all ApplicationService
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanecopin committed Jan 8, 2018
1 parent 465ebe3 commit d6863c7
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ import CloudKit
/// It doesn't add more functionalities yet.
public protocol ApplicationService: UIApplicationDelegate {}

extension ApplicationService {
public var window: UIWindow? {
return UIApplication.shared.delegate?.window ?? nil
}
}

open class PluggableApplicationDelegate: UIResponder, UIApplicationDelegate {

public var window: UIWindow?
Expand Down

0 comments on commit d6863c7

Please sign in to comment.