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
83ab6b00
Commit
83ab6b00
authored
Oct 26, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UIViewController.motionModalTransitionType renamed to UIViewController.motionTransitionType
parent
b9a25764
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
CHANGELOG.md
+4
-0
Sources/Extensions/Motion+UIViewController.swift
+15
-7
Sources/Preprocessors/TransitionPreprocessor.swift
+1
-1
No files found.
CHANGELOG.md
View file @
83ab6b00
## 1.2.5
*
`UIViewController.motionModalTransitionType`
renamed to
`UIViewController.motionTransitionType`
.
## 1.2.4
## 1.2.4
*
Added begin / end transition methods for from / to view controllers.
*
Added begin / end transition methods for from / to view controllers.
...
...
Sources/Extensions/Motion+UIViewController.swift
View file @
83ab6b00
...
@@ -74,8 +74,8 @@ extension UIViewController {
...
@@ -74,8 +74,8 @@ extension UIViewController {
}
}
}
}
///
default motion animation type for presenting & dismissing modally
///
Default motion animation type for presenting & dismissing modally.
public
var
motion
Modal
TransitionType
:
MotionTransitionType
{
public
var
motionTransitionType
:
MotionTransitionType
{
get
{
get
{
return
associatedInstance
.
modalTransitionType
return
associatedInstance
.
modalTransitionType
}
}
...
@@ -84,7 +84,7 @@ extension UIViewController {
...
@@ -84,7 +84,7 @@ extension UIViewController {
}
}
}
}
///
used for .overFullScreen presentation
///
Used for .overFullScreen presentation.
internal
var
motionStoredSnapshot
:
UIView
?
{
internal
var
motionStoredSnapshot
:
UIView
?
{
get
{
get
{
return
associatedInstance
.
storedSnapshot
return
associatedInstance
.
storedSnapshot
...
@@ -200,22 +200,30 @@ extension UIViewController {
...
@@ -200,22 +200,30 @@ extension UIViewController {
/// Unwind to the root view controller using Motion.
/// Unwind to the root view controller using Motion.
@IBAction
@IBAction
public
func
motionUnwindToRootViewController
()
{
public
func
motionUnwindToRootViewController
()
{
motionUnwindToViewController
{
$0
.
presentingViewController
==
nil
}
motionUnwindToViewController
{
nil
==
$0
.
presentingViewController
}
}
}
/// Unwind to a specific view controller using Motion.
/// Unwind to a specific view controller using Motion.
public
func
motionUnwindToViewController
(
_
toViewController
:
UIViewController
)
{
public
func
motionUnwindToViewController
(
_
toViewController
:
UIViewController
)
{
motionUnwindToViewController
{
$0
==
toViewController
}
motionUnwindToViewController
{
$0
==
toViewController
}
}
}
/// Unwind to a view controller that responds to the given selector using Motion.
/// Unwind to a view controller that responds to the given selector using Motion.
public
func
motionUnwindToViewController
(
withSelector
:
Selector
)
{
public
func
motionUnwindToViewController
(
withSelector
:
Selector
)
{
motionUnwindToViewController
{
$0
.
responds
(
to
:
withSelector
)
}
motionUnwindToViewController
{
$0
.
responds
(
to
:
withSelector
)
}
}
}
/// Unwind to a view controller with given class using Motion
/// Unwind to a view controller with given class using Motion
public
func
motionUnwindToViewController
(
withClass
:
AnyClass
)
{
public
func
motionUnwindToViewController
(
withClass
:
AnyClass
)
{
motionUnwindToViewController
{
$0
.
isKind
(
of
:
withClass
)
}
motionUnwindToViewController
{
$0
.
isKind
(
of
:
withClass
)
}
}
}
/// Unwind to a view controller that the matchBlock returns true on.
/// Unwind to a view controller that the matchBlock returns true on.
...
...
Sources/Preprocessors/TransitionPreprocessor.swift
View file @
83ab6b00
...
@@ -222,7 +222,7 @@ class TransitionPreprocessor: MotionPreprocessor {
...
@@ -222,7 +222,7 @@ class TransitionPreprocessor: MotionPreprocessor {
}
else
if
isTabBarController
,
let
tabAnim
=
toViewController
?
.
tabBarController
?
.
motionTabBarTransitionType
{
}
else
if
isTabBarController
,
let
tabAnim
=
toViewController
?
.
tabBarController
?
.
motionTabBarTransitionType
{
defaultAnimation
=
tabAnim
defaultAnimation
=
tabAnim
}
else
if
let
modalAnim
=
(
isPresenting
?
toViewController
:
fromViewController
)?
.
motion
Modal
TransitionType
{
}
else
if
let
modalAnim
=
(
isPresenting
?
toViewController
:
fromViewController
)?
.
motionTransitionType
{
defaultAnimation
=
modalAnim
defaultAnimation
=
modalAnim
}
}
}
}
...
...
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