Giter VIP home page Giter VIP logo

Comments (3)

wtmoose avatar wtmoose commented on May 29, 2024

@jmarr I appreciate the detailed writeup. I'm unlikely to look at this anytime soon given that it is an obscure problem and you have a workaround. Hopefully it will resolve itself in a future version of iOS.

from swiftmessages.

jmarr avatar jmarr commented on May 29, 2024

@wtmoose Thanks and yeah, that's totally understandable. I mostly wanted to post it here in case anyone else runs into the issue, since it took a while to discover thatoverrideUserInterfaceStyle was triggering it.

In our app the issue was much more noticeable because we have a container view with a bottom bar that sets additionalSafeAreaInsets on its children, so the message was appearing entirely behind the bar.

And yes, hopefully the underlying issue will be resolved in an iOS update, though I did verify it's still happening on the latest iOS 17.1 beta.

from swiftmessages.

jmarr avatar jmarr commented on May 29, 2024

I just discovered that this issue also occurs when showing a message from a view controller that's being presented.

  1. Build and run this project on a device with safe areas.
  2. Tap Show Message and note that the message respects the safe area.
  3. Tap Present View Controller.
  4. Tap Show Message and note that the message overlaps the safe area.

The issue doesn't occur if I change the presentationContext from .viewController(self) to .window(windowLevel: .normal)

In stepping through the code, after calling container.layoutIfNeeded() on line 100 of TopBottomAnimation.swift, the frame of container is changed and no longer overlapping the safe area, so the safe area isn't taken into account by the call to adjustMargins, just like when overrideUserInterfaceStyle was used.

from swiftmessages.

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.