Comments (4)
Thank you! We will investigate this.
from motion.
This seems to be iOS bug but I believe we can workaround this.
Here is what is going on under the hood:
When in-call/hotspot/recording status bar (let's call it thick status bar) is enabled/disabled, frame.origin.y
of the topmost view in the window
subview hierarchy (rootView
) is increased/decreased by 20. So the thick statusBar only changes rootView
's y
position
When we do a modal transition from any (let's say deepest) view controller ( fromViewController
) in the hierarchy to an arbitrary view controller (toViewContoller
), new view of type UITransitionView
is created. It becomes the rootView
, contains view
s of both from and to viewController
s and lives until the toViewController
is dismissed.
When UITransitionView
becomes the rootView
and we have thick status bar, y
value of previous rootView
is reduced by 20
, so it becomes 0 (but in Motion's case it became -20 in between transitions). And that UITransitionView
, now being the rootView
, happens to have y
value of 20. So the thick status bar only affects rootView
no matter what it is.
Now, when the modally presented toViewController
is getting dismissed, and the transition is complete, that UITransitionView
(as well as toViewController
) is removed from the hierarchy and previous rootViewController
(not fromViewController
) now becomes the rootView
.
Since rootViewController
now became the rootView
and its frame was changed due to the insertion of UITransitionView
previously, the code (which is inside UIKit
) that had changed our rootViewController
's y value is also responsible for setting it back. Here is the point where I tend to believe is UIKit
bug. In the case of dismissal of UIKit
modal transition, the value (I mean rootViewController
's y value) is successfully updated back, but when we dismiss a Motion
modal transition that value is updated incorrectly, UIKit
sets 20 for y value in the case of UIKit
dismissal but 0 for Motion
dismissal (considering that we have thick status bar).
@DanielDahan We can workaround this by setting rootViewController.frame.origin.y = 20
upon the completion of modal transition if we have thick status bar. What do you think?
from motion.
The fix for this is now in the development
branch. Thank you @OrkhanAlikhanov. A Release will be ready tomorrow.
from motion.
@OrkhanAlikhanov thanks for your well explained reply I appreciate it. I'll try the fix today.
from motion.
Related Issues (20)
- control interactive transition HOT 5
- Stop and remove all animations HOT 5
- Update to Swift 4.2
- Animate back to original state HOT 2
- issue with interactive transition HOT 7
- Application freeze when closing app while transition HOT 7
- Swift5 Support HOT 1
- The "Material - It's time to download" link is boken. HOT 2
- Add installation instructions HOT 1
- Pan gesture not being applied correctly. HOT 4
- can not set motionNavigationTransitionType in objc HOT 17
- Having trouble animating ImageView of different contentMode and Size HOT 2
- .hidesBottomBarWhenPushed = true smooth transition when pushing HOT 11
- Motion affects other 3-rd party animation libraries HOT 9
- Transition always uses zoom effect HOT 12
- UITabbar overlay
- UINavigationControllerDelegate make is not work HOT 2
- Interactive transition with UINavigationController
- Swift package manager support
- Swift 5.7 support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion.