You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wanted to report what seems like a bug with a similar behavior to #133.
In the image the tooltip is being presented from the superview of the people button it is pointing at but it ends up being positioned partially off screen.
Would it make sense to have a property like constrainOnScreen that is similar to constrainInContainerView except that a check is made to make sure that he tooltip is on screen?
Note that I increased edgeMargin to 20 and it had no effect in this case. Another side note is that I set edgeMargin to -3 since if a tooltip is close to the top of the screen and the arrowSize is larger then the tooltip arrow does not render correctly but that is a separate issue I can file.
In the example above the superview is fully on the screen but because of constrainInContainerView = false the tooltip is allowed to be laid out off the screen.
Also note that the tooltip could be presented from the keywindow or a top level view controller to avoid being offscreen since the window is full screen and constrainInContainerView can be set to true, but then if the button (or whatever the tooltip is pointing at) moves then the tooltip is just left floating pointing at nothing. Keeping the tooltip presented from a view close in the view hierarchy avoids a lot of corner case handling for when views move.
The text was updated successfully, but these errors were encountered:
jrabek
pushed a commit
to airtimemedia/AMPopTip
that referenced
this issue
Mar 14, 2019
I ended adding a constrainToView property in the referenced PR to handle the case above: There is a view that I want to target and I want to present the tooltip from the target view's superview so they stay more closely attached, but I also don't want the tooltip to appear off screen.
To use this property to limit the tooltip to the screen you can do something like:
Thanks for the great framework!
Wanted to report what seems like a bug with a similar behavior to #133.
In the image the tooltip is being presented from the superview of the people button it is pointing at but it ends up being positioned partially off screen.
The full config for the popTip is
Would it make sense to have a property like
constrainOnScreen
that is similar toconstrainInContainerView
except that a check is made to make sure that he tooltip is on screen?Note that I increased
edgeMargin
to 20 and it had no effect in this case. Another side note is that I set edgeMargin to -3 since if a tooltip is close to the top of the screen and the arrowSize is larger then the tooltip arrow does not render correctly but that is a separate issue I can file.In the example above the superview is fully on the screen but because of
constrainInContainerView = false
the tooltip is allowed to be laid out off the screen.Also note that the tooltip could be presented from the keywindow or a top level view controller to avoid being offscreen since the window is full screen and
constrainInContainerView
can be set totrue
, but then if the button (or whatever the tooltip is pointing at) moves then the tooltip is just left floating pointing at nothing. Keeping the tooltip presented from a view close in the view hierarchy avoids a lot of corner case handling for when views move.The text was updated successfully, but these errors were encountered: