Comments (3)
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.
Awesome, glad it worked!
from popovers.
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)
- Popover showing in different position based on iOS HOT 6
- Popover arrow following the source view incorrectly due to screen limitations HOT 5
- SwiftUI Menu fails inside popover HOT 2
- Popover assumes the maxWidth or maxHeight value as the size of the popover, if it was defined with .frame(maxWidth, maxHeight) HOT 1
- onTapOutside called twice
- The following block of code, sometimes requires multiple clicks to execute the code inside the closure HOT 1
- The prints are all false HOT 1
- NavigationView usage animation bug HOT 1
- Question: How can i get this to work for a tabview item?
- Popover doesn't re-render its view when identity changes HOT 2
- Popover doesn't position properly HOT 2
- Unable to use a MenuButton twice in a row. HOT 3
- Type 'Templates' has no member 'DividedVStack'
- 'onChange(of:perform:)' is only available in iOS 14.0 or newer HOT 2
- Possible retain cycle on UIKit menu? HOT 4
- I cannot change color or add frame to image or text in Menu in style !
- Finding an element in popover during ui testing.
- Menu not work correctly with RTL Language
- Popover inside Scrollview not supported? HOT 1
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 popovers.