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
c46cc0b6
Commit
c46cc0b6
authored
Mar 31, 2019
by
Orkhan Alikhanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to call appearance methods when transitionContext exists
They are called by UIKit
parent
edc38b64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
Sources/Transition/MotionTransition+Start.swift
+1
-1
Sources/Transition/MotionTransition.swift
+10
-7
No files found.
Sources/Transition/MotionTransition+Start.swift
View file @
c46cc0b6
...
...
@@ -85,7 +85,7 @@ fileprivate extension MotionTransition {
/// Prepares the from and to view controllers.
func
prepareViewControllers
()
{
processStartTransitionDelegation
(
fromViewController
:
fromViewController
,
toViewController
:
toViewController
)
processStartTransitionDelegation
(
transitionContext
:
transitionContext
,
fromViewController
:
fromViewController
,
toViewController
:
toViewController
)
}
/// Prepares the snapshot view, which hides any flashing that may occur.
...
...
Sources/Transition/MotionTransition.swift
View file @
c46cc0b6
...
...
@@ -589,10 +589,11 @@ public extension MotionTransition {
internal
extension
MotionTransition
{
/**
Processes the start transition delegation methods.
- Parameter transitionContext: An optional UIViewControllerContextTransitioning.
- Parameter fromViewController: An optional UIViewController.
- Parameter toViewController: An optional UIViewController.
*/
func
processStartTransitionDelegation
(
fromViewController
:
UIViewController
?,
toViewController
:
UIViewController
?)
{
func
processStartTransitionDelegation
(
transitionContext
:
UIViewControllerContextTransitioning
?,
fromViewController
:
UIViewController
?,
toViewController
:
UIViewController
?)
{
guard
let
fvc
=
fromViewController
else
{
return
}
...
...
@@ -601,7 +602,7 @@ internal extension MotionTransition {
return
}
if
!
isModalTransition
{
if
transitionContext
==
nil
{
fvc
.
beginAppearanceTransition
(
false
,
animated
:
true
)
tvc
.
beginAppearanceTransition
(
true
,
animated
:
true
)
}
...
...
@@ -640,7 +641,7 @@ internal extension MotionTransition {
return
}
if
!
isModalTransition
{
if
transitionContext
==
nil
{
tvc
.
endAppearanceTransition
()
fvc
.
endAppearanceTransition
()
}
...
...
@@ -681,10 +682,12 @@ internal extension MotionTransition {
return
}
tvc
.
beginAppearanceTransition
(
false
,
animated
:
true
)
tvc
.
endAppearanceTransition
()
fvc
.
beginAppearanceTransition
(
true
,
animated
:
true
)
fvc
.
endAppearanceTransition
()
if
transitionContext
==
nil
{
tvc
.
beginAppearanceTransition
(
false
,
animated
:
true
)
tvc
.
endAppearanceTransition
()
fvc
.
beginAppearanceTransition
(
true
,
animated
:
true
)
fvc
.
endAppearanceTransition
()
}
processForMotionDelegate
(
viewController
:
fvc
)
{
[
weak
self
]
in
guard
let
`
self
`
=
self
else
{
...
...
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