Code Monkey home page Code Monkey logo

Comments (3)

DavidSReich avatar DavidSReich commented on September 26, 2024 2

Solved!!!!

The layout code gets confused when the width of the View that we are popping-over is wider than screenwidth - 32. Which is what happens when I try to set the width == UIScreen.main.bounds.width.

The problem was that screenEdgePadding's default are UIEdgeInsets(16).
Adding this fixed my problem:

$0.screenEdgePadding = UIEdgeInsets(top: 16, left: 0, bottom: 16, right: 0)

When I do this I don't need to explicitly set the width.

The code that uses this is func calculateFrame() in Popover.

from popovers.

aheze avatar aheze commented on September 26, 2024

Awesome, glad it worked!

from popovers.

DavidSReich avatar DavidSReich commented on September 26, 2024

Thanks for the useful library.

The design of the project I'm working on wants messages to overlap the navigation title. That's easy to do on the first screen with the NavigationView. But not easy on successive screens reached via NavigationLink because the nav bar is owned by a previous screen. Popover solves that easily.
They also want things like menus to sit at the bottom and cover a tab bar with an overlay of a transparent background on top of the rest of the screen (include the title).
All of that architecture is not readily accessible (or coverable) from a View that is deeply nested. Again, Popover solves that one.

from popovers.

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.