Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Motion
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
Motion
Commits
358c2a4c
Unverified
Commit
358c2a4c
authored
Sep 25, 2018
by
Daniel Dahan
Committed by
GitHub
Sep 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #54 from OrkhanAlikhanov/completion
Added setCompletionCallbackForNextTransition
parents
4a8fa6a7
66bf027f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
Sources/MotionViewTransition.swift
+1
-1
Sources/Transition/MotionTransition+CustomTransition.swift
+1
-10
Sources/Transition/MotionTransition.swift
+8
-0
No files found.
Sources/MotionViewTransition.swift
View file @
358c2a4c
...
...
@@ -131,8 +131,8 @@ private extension MotionViewTransition {
/// Finalizes the transition.
func
complete
()
{
clean
()
removeAnimations
()
clean
()
}
/// Resets the transition.
...
...
Sources/Transition/MotionTransition+CustomTransition.swift
View file @
358c2a4c
...
...
@@ -47,16 +47,7 @@ extension MotionTransition {
fromViewController
=
from
toViewController
=
to
completionCallback
=
{
[
weak
self
]
in
guard
let
`
self
`
=
self
else
{
return
}
completion
?(
$0
)
self
.
state
=
.
possible
}
setCompletionCallbackForNextTransition
(
completion
)
start
()
}
}
Sources/Transition/MotionTransition.swift
View file @
358c2a4c
...
...
@@ -576,6 +576,14 @@ public extension MotionTransition {
func
setContainerBackgroundColorForNextTransition
(
_
color
:
UIColor
)
{
containerBackgroundColor
=
color
}
/**
Set the completion callback closure for the next transition.
- Parameter _ completion: An optional closure receiving a Boolean indicating if transition is finishing or cancelling.
*/
func
setCompletionCallbackForNextTransition
(
_
completion
:
((
Bool
)
->
Void
)?)
{
completionCallback
=
completion
}
}
internal
extension
MotionTransition
{
...
...
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