Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #60 from thiagodelmotte/master
Browse files Browse the repository at this point in the history
fixing applicationDidEnterBackground issue #59
  • Loading branch information
morizotter committed Nov 21, 2017
2 parents 21b2ae0 + 42491db commit 439f8e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SwiftyDrop/Drop.swift
Expand Up @@ -73,7 +73,7 @@ public final class Drop: UIView {
self.duration = duration

scheduleUpTimer(duration)
NotificationCenter.default.addObserver(self, selector: #selector(UIApplicationDelegate.applicationDidEnterBackground(_:)), name: NSNotification.Name.UIApplicationDidEnterBackground, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(self.applicationDidEnterBackground(_:)), name: NSNotification.Name.UIApplicationDidEnterBackground, object: nil)
}

override init(frame: CGRect) {
Expand All @@ -89,7 +89,7 @@ public final class Drop: UIView {
NotificationCenter.default.removeObserver(self)
}

func applicationDidEnterBackground(_ notification: Notification) {
@objc func applicationDidEnterBackground(_ notification: Notification) {
stopUpTimer()
removeFromSuperview()
}
Expand Down

0 comments on commit 439f8e9

Please sign in to comment.