scenee / FloatingPanel

A clean and easy-to-use floating panel UI component for iOS
MIT License
5.59k stars 508 forks source link

Allow the panel sheet to go above the upper position when it is in full state #569

Open engali94 opened 1 year ago

engali94 commented 1 year ago

Allow the panel sheet to go above the upper position when it is in the .full state

scenee commented 1 year ago

Allow the panel sheet to go above the upper position when it is in the .full state

We are able to allow this behavior without introducing a new API. See this code in Maps sample

https://github.com/scenee/FloatingPanel/blob/f9173161358b2d77ef70550dfd0c3f5014fbeafe/Examples/Maps/Maps/MainViewController.swift#L178-L184

It limits the most upper position of the panel to 6pt above the .full position. We can also customize the limitation and handle other positioned panel(top, left and right) along with user specific use cases.

See also here: https://github.com/scenee/FloatingPanel#specify-the-panel-moves-boundary