Change default popup bar view tap gesture action. #42
-
I am using the default popupBar view, most of the time, the default tap gesture work well, but in some case, i want to make the popup bar tap gesture to a different action, like execute an async task, and the most important is don't show content view. Because of the default pupop bar view works perfect to me, so i don't want to use a custom popupbar view. So i dont know how to change the tap gesture event some times. Many thanks if you can answer my question. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, What more, from a design point, I don’t think this is a good UX. Your users are used to having the popup open when tapping the bar, and modifying that behavior, occasionally, sounds like a source of confusion. Thanks |
Beta Was this translation helpful? Give feedback.
Hello,
This is not possible in the underlying LNPopupController framework, but there you have access to the gesture recognizer, which you can disable or use the delegate to modify. You also have access to the popup bar view, which allows adding more gesture recognizers. You can achieve these with LNPopupUI too, through the
popupBarCustomizer(_:)
modifier, but it will not be a pure SwiftUI solution. Unfortunately, like anything with SwiftUI, implementing a native solution is more trouble than it is worth, so you will have to work with this solution.What more, from a design point, I don’t think this is a good UX. Your users are used to having the popup open when tapping the bar, and modify…