Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poptip and subviews hierarchy #138

Open
pgawlowski opened this issue Nov 13, 2017 · 4 comments
Open

Poptip and subviews hierarchy #138

pgawlowski opened this issue Nov 13, 2017 · 4 comments

Comments

@pgawlowski
Copy link

Everything seems to be fine until you try to show tip over view that is in more complex view hierarchy.

Is it possible to ommit in: parameter and display it on top of view hierarchy but snapped to target using absolute coordinates?

screen shot 2017-11-13 at 22 53 07

@pgawlowski pgawlowski changed the title Poptip in and subviews hierarchy Poptip and subviews hierarchy Nov 13, 2017
@andreamazz
Copy link
Owner

The poptip is just a basic UIView in the end, it's added as a subview of the in: parameter. If you want to move it above your hierarchy, just provide the main superview as in: and adjust the from: to the absolute coordinates

@pgawlowski
Copy link
Author

Just figured it out. My question is why it is not using global coordinates and
UIApplication.shared.keyWindow by default? In that case method will be simpler (just provide starting rect) as well as you'll be sure that pop will be always visible.

@andreamazz
Copy link
Owner

I wanted it to behave like a common UIView, but I see your point. It might be worth having another overload for the show method that places it in the key window in an absolute position. 🤔

@pgawlowski
Copy link
Author

Do you have any additional info about snapping this kind of UIView?

I mean I'm adding it on top of everything, however I would like to preserve position change e.x when keyboard slides out to move pop with the whole view. Right now it is kind of broken and I'm not very used to work with this kind of transitions and changes.

Any hints?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants