Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jnblanchard committed Feb 5, 2019
1 parent 2eb2d52 commit 2386ad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion JNBBottombar.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'JNBBottombar'
s.version = '0.1.1'
s.version = '1.0.0'
s.summary = 'Customizable bottom bar controller.'
s.swift_version = '4.2'

Expand Down
7 changes: 7 additions & 0 deletions JNBBottombar/Classes/JNBBottombar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public class JNBBottombar: NSObject {
bottomAnchor: NSLayoutYAxisAnchor? = nil,
borderWidth: CGFloat = 0,
borderColor: CGColor = UIColor.clear.cgColor,
forDuration: TimeInterval? = nil,
completion: ((Bool) -> Void)? = nil ) {

guard let topVC = topViewController() else { return }
Expand Down Expand Up @@ -204,6 +205,12 @@ public class JNBBottombar: NSObject {
topVC.view.layoutSubviews()
}) { (completed) in
completion?(completed)
if let fullDuration = forDuration {
let _ = Timer.scheduledTimer(withTimeInterval: fullDuration, repeats: false) { (timer) in
guard timer.isValid else { return }
self.hide()
}
}
}
}

Expand Down

0 comments on commit 2386ad4

Please sign in to comment.