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
1c31140b
Commit
1c31140b
authored
Jul 30, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
2fd5d3b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
Motion.xcodeproj/project.pbxproj
+2
-2
Sources/Extensions/Motion+CAMediaTimingFunction.swift
+3
-3
Sources/Motion.swift
+6
-5
No files found.
Motion.xcodeproj/project.pbxproj
View file @
1c31140b
...
...
@@ -142,8 +142,6 @@
96E4093B1F24F7370015A2B5
/* Sources */
=
{
isa
=
PBXGroup
;
children
=
(
96E4093C1F24F7370015A2B5
/* Animator */
,
96E409431F24F7370015A2B5
/* Extensions */
,
96E409BB1F24FC210015A2B5
/* Info.plist */
,
96E409BC1F24FC300015A2B5
/* LICENSE */
,
96E4094F1F24F7370015A2B5
/* Motion.h */
,
...
...
@@ -160,6 +158,8 @@
96E4095A1F24F7370015A2B5
/* MotionTransition.swift */
,
96E4095B1F24F7370015A2B5
/* MotionTransitionObserver.swift */
,
96E4095C1F24F7370015A2B5
/* MotionTransitionState.swift */
,
96E4093C1F24F7370015A2B5
/* Animator */
,
96E409431F24F7370015A2B5
/* Extensions */
,
96E4095D1F24F7370015A2B5
/* Preprocessors */
,
);
path
=
Sources
;
...
...
Sources/Extensions/Motion+CAMediaTimingFunction.swift
View file @
1c31140b
...
...
@@ -29,18 +29,18 @@
import
UIKit
public
extension
CAMediaTimingFunction
{
//
d
efault
//
D
efault
static
let
linear
=
CAMediaTimingFunction
(
name
:
kCAMediaTimingFunctionLinear
)
static
let
easeIn
=
CAMediaTimingFunction
(
name
:
kCAMediaTimingFunctionEaseIn
)
static
let
easeOut
=
CAMediaTimingFunction
(
name
:
kCAMediaTimingFunctionEaseOut
)
static
let
easeInOut
=
CAMediaTimingFunction
(
name
:
kCAMediaTimingFunctionEaseInEaseOut
)
//
m
aterial
//
M
aterial
static
let
standard
=
CAMediaTimingFunction
(
controlPoints
:
0.4
,
0.0
,
0.2
,
1.0
)
static
let
deceleration
=
CAMediaTimingFunction
(
controlPoints
:
0.0
,
0.0
,
0.2
,
1
)
static
let
acceleration
=
CAMediaTimingFunction
(
controlPoints
:
0.4
,
0.0
,
1
,
1
)
static
let
sharp
=
CAMediaTimingFunction
(
controlPoints
:
0.4
,
0.0
,
0.6
,
1
)
//
e
asing.net
//
E
asing.net
static
let
easeOutBack
=
CAMediaTimingFunction
(
controlPoints
:
0.175
,
0.885
,
0.32
,
1.75
)
}
Sources/Motion.swift
View file @
1c31140b
...
...
@@ -305,7 +305,7 @@ internal extension Motion {
context
.
clean
()
if
isFinished
&&
isPresenting
&&
toOverFullScreen
{
// finished presenting a overFullScreen
VC
// finished presenting a overFullScreen
view controller.
context
.
unhide
(
rootView
:
tv
)
context
.
removeSnapshots
(
rootView
:
tv
)
context
.
storeViewAlpha
(
rootView
:
fv
)
...
...
@@ -314,7 +314,7 @@ internal extension Motion {
fv
.
removeFromSuperview
()
fv
.
addSubview
(
c
)
}
else
if
!
isFinished
&&
!
isPresenting
&&
fromOverFullScreen
{
//
cancelled dismissing a overFullScreen VC
//
Cancelled dismissing a overFullScreen view controller.
context
.
unhide
(
rootView
:
fv
)
context
.
removeSnapshots
(
rootView
:
fv
)
context
.
storeViewAlpha
(
rootView
:
tv
)
...
...
@@ -328,7 +328,7 @@ internal extension Motion {
c
.
removeFromSuperview
()
}
//
move fromView & toView back from our container back to the one supplied by UIKit
//
Move fromView & toView back from our container back to the one supplied by UIKit.
if
(
toOverFullScreen
&&
isFinished
)
||
(
fromOverFullScreen
&&
!
isFinished
)
{
tc
.
addSubview
(
isFinished
?
fv
:
tv
)
}
...
...
@@ -336,7 +336,7 @@ internal extension Motion {
tc
.
addSubview
(
isFinished
?
tv
:
fv
)
if
isPresenting
!=
isFinished
,
!
isContainerController
{
//
only happens when present a .overFullScreen VC
//
Only happens when present a .overFullScreen view controller.
// bug: http://openradar.appspot.com/radar?id=5320103646199808
UIApplication
.
shared
.
keyWindow
!.
addSubview
(
isPresenting
?
fv
:
tv
)
}
...
...
@@ -418,8 +418,9 @@ fileprivate extension Motion {
}
context
.
loadViewAlpha
(
rootView
:
tv
)
context
.
loadViewAlpha
(
rootView
:
fv
)
v
.
addSubview
(
tv
)
context
.
loadViewAlpha
(
rootView
:
fv
)
v
.
addSubview
(
fv
)
}
...
...
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