Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
414bc223
Commit
414bc223
authored
Oct 04, 2016
by
adamdahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix snackbar
parent
b9eae8c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Examples/Storyboards/SnackbarController/SnackbarController/Main.storyboard
+1
-1
Examples/Storyboards/SnackbarController/SnackbarController/RootViewController.swift
+6
-2
No files found.
Examples/Storyboards/SnackbarController/SnackbarController/Main.storyboard
View file @
414bc223
...
...
@@ -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"
/>
...
...
Examples/Storyboards/SnackbarController/SnackbarController/RootViewController.swift
View file @
414bc223
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment