Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlui committed Jul 27, 2015
1 parent b1d88d7 commit 426d865
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SwiftNotice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class SwiftNotice: NSObject {
static var windows = Array<UIWindow!>()
static let rv = UIApplication.sharedApplication().keyWindow?.subviews.first as UIView!

// fix https://github.com/johnlui/SwiftNotice/issues/2
// thanks broccolii(https://github.com/broccolii) and his PR https://github.com/johnlui/SwiftNotice/pull/5
static func clear() {
self.cancelPreviousPerformRequestsWithTarget(self)
windows.removeAll(keepCapacity: false)
Expand Down Expand Up @@ -185,6 +187,7 @@ class SwiftNotice: NSObject {
}
}

// fix https://github.com/johnlui/SwiftNotice/issues/2
static func hideNotice(sender: AnyObject) {
if let window = sender as? UIWindow {
if let index = windows.indexOf({ (item) -> Bool in
Expand Down
Binary file not shown.

0 comments on commit 426d865

Please sign in to comment.