Giter VIP home page Giter VIP logo

Comments (4)

OrkhanAlikhanov avatar OrkhanAlikhanov commented on August 25, 2024 1

Thank you! We will investigate this.

from motion.

OrkhanAlikhanov avatar OrkhanAlikhanov commented on August 25, 2024 1

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 views of both from and to viewControllers 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.

daniel-jonathan avatar daniel-jonathan commented on August 25, 2024

The fix for this is now in the development branch. Thank you @OrkhanAlikhanov. A Release will be ready tomorrow.

from motion.

laubengaier avatar laubengaier commented on August 25, 2024

@OrkhanAlikhanov thanks for your well explained reply I appreciate it. I'll try the fix today.

from motion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.