FloatingPanel
FloatingPanel is a simple and easy-to-use UI component for a new interface introduced in Apple Maps, Shortcuts and Stocks app. The new interface displays the related contents and utilities in parallel as a user wants.
Features
- [x] Simple container view controller
- [x] Fluid animation and gesture handling
- [x] Scroll view tracking
- [x] Common UI elements: Grabber handle, Backdrop and Surface rounding corners
- [x] 2 or 3 anchor positions(full, half, tip)
- [x] Layout customization for all trait environments(i.e. Landscape orientation support)
- [x] Behavior customization
- [x] Free from common issues of Auto Layout and gesture handling
Examples are here.
- Examples/Maps like Apple Maps.app.
- Examples/Stocks like Apple Stocks.app.
Requirements
FloatingPanel is written in Swift 4.2. Compatible with iOS 10.0+
Installation
CocoaPods
FloatingPanel is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Carthage
For Carthage, add the following to your Cartfile
:
Getting Started
Usage
Move a positon with an animation
Move a floating panel to the top and middle of a view while opening and closeing a search bar like Apple Maps.