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
3c48ac4d
Commit
3c48ac4d
authored
Aug 01, 2018
by
Orkhan Alikhanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue-44, view is hidden below status bar during call
parent
5d06317a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
Sources/Transition/MotionTransition+Complete.swift
+28
-0
No files found.
Sources/Transition/MotionTransition+Complete.swift
View file @
3c48ac4d
...
...
@@ -143,5 +143,33 @@ extension MotionTransition {
}
tContext
?
.
completeTransition
(
isFinishing
)
let
isModalDismissal
=
isModalTransition
&&
!
isPresenting
if
isModalDismissal
{
UIApplication
.
shared
.
fixRootViewY
()
}
}
}
private
extension
UIApplication
{
/**
When in-call, hotspot, or recording status bar is enabled, just after (custom) modal
dismissal transition animation ends `UITransitionView` is removed from the hierarchy
and that removal was moving `rootViewController.view` 20 points upwards. This function
should be called after transitioningContext.completeTransition(_:) upon modal dismissal
transition. It applies the work that `UITransitionView` should ideally have done after
custom modal dismissal. `UIKit` modal dismissals do not suffer from this.
Fixes issue-44. See issue-44 for more info.
*/
func
fixRootViewY
()
{
guard
statusBarFrame
.
height
==
40
,
let
window
=
keyWindow
,
let
vc
=
window
.
rootViewController
else
{
return
}
if
vc
.
view
.
frame
.
maxY
+
20
==
window
.
frame
.
height
{
vc
.
view
.
frame
.
origin
.
y
+=
20
}
}
}
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