Commit 414bc223 by adamdahan

Fix snackbar

parent b9eae8c2
......@@ -9,7 +9,7 @@
<!--Root View Controller-->
<scene sceneID="f2e-GW-ekS">
<objects>
<viewController storyboardIdentifier="RootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="48R-gP-vnF" customClass="RootViewController" customModule="Material" sceneMemberID="viewController">
<viewController storyboardIdentifier="RootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="48R-gP-vnF" customClass="RootViewController" customModule="SnackbarController" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="fBa-N0-gYK"/>
<viewControllerLayoutGuide type="bottom" id="FTf-m2-wWl"/>
......
......@@ -46,7 +46,7 @@ class RootViewController: UIViewController {
super.viewDidAppear(animated)
prepareSnackbar()
animateSnackbar()
scheduleAnimation()
}
private func prepareUndoButton() {
......@@ -64,7 +64,11 @@ class RootViewController: UIViewController {
sc.snackbar.rightViews = [undoButton]
}
private func animateSnackbar() {
private func scheduleAnimation() {
_ = Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(self.animateSnackbar), userInfo: nil, repeats: true)
}
@objc private func animateSnackbar() {
guard let sc = snackbarController else {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment