[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6810":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":28,"discoverSource":29},6810,"FloatingPanel","scenee\u002FFloatingPanel","scenee","A clean and easy-to-use floating panel UI component for iOS","",null,"Swift",5812,535,50,85,0,2,7,1,39.19,"MIT License",false,"master",[],"2026-06-12 02:01:30","# FloatingPanel\n\nFloatingPanel is a simple and easy-to-use UI component designed for a user interface featured in Apple Maps, Shortcuts and Stocks app.\nThe user interface displays related content and utilities alongside the main content.\n\n![Maps](Documentation\u002Fassets\u002Fmaps.gif)\n![Stocks](Documentation\u002Fassets\u002Fstocks.gif)\n\n![Maps(Landscape)](Documentation\u002Fassets\u002Fmaps-landscape.gif)\n\n## Table of Contents\n\n\u003Cdetails>\n\u003Csummary>\nClick here.\n\u003C\u002Fsummary>\n\n- [Table of Contents](#table-of-contents)\n- [Features](#features)\n- [Requirements](#requirements)\n- [Documentation](#documentation)\n- [Installation](#installation)\n  - [Swift Package Manager](#swift-package-manager)\n    - [Using Xcode](#using-xcode)\n    - [Using Package.swift](#using-packageswift)\n  - [CocoaPods](#cocoapods)\n- [Getting Started with SwiftUI](#getting-started-with-swiftui)\n  - [Adding a floating panel within a view](#adding-a-floating-panel-within-a-view)\n  - [Presenting a floating panel modally within a view](#presenting-a-floating-panel-modally-within-a-view)\n  - [Displaying multiple panels](#displaying-multiple-panels)\n  - [Next step](#next-step)\n- [Getting Started with UIKit](#getting-started-with-uikit)\n  - [Adding a floating panel as a child view controller](#adding-a-floating-panel-as-a-child-view-controller)\n  - [Presenting a floating panel modally](#presenting-a-floating-panel-modally)\n  - [Next step](#next-step-1)\n- [Maintainer](#maintainer)\n- [License](#license)\n\n\u003C\u002Fdetails>\n\n## Features\n\n- Simple container view controller\n- Fluid behavior using numeric springing\n- Scroll view tracking\n- Removal interaction\n- Multi panel support\n- Modal presentation\n- Support for 4 positions (top, left, bottom, right)\n- 1 or more magnetic anchors(full, half, tip and more)\n- Layout support for all trait environments(i.e. Landscape orientation)\n- Common UI elements: surface, backdrop and grabber handle\n- Free from common Auto Layout and gesture handling issues\n- Compatible with Objective-C\n- SwiftUI API support\n\nExamples can be found here:\n\n- [Maps](Examples\u002FMaps) like Apple Maps.app.\n- [Maps-SwiftUI](Examples\u002FMaps-SwiftUI) like Apple Maps.app using SwiftUI.\n- [Stocks](Examples\u002FStocks) like Apple Stocks.app.\n- [Samples](Examples\u002FSamples)\n- [SamplesObjC](Examples\u002FSamplesObjC)\n- [SamplesSwiftUI](Examples\u002FSamplesSwiftUI)\n\n## Requirements\n\nFloatingPanel is written in Swift 5.0+ and compatible with iOS 12.0+.\n\n## Documentation\n\n- [API reference on Swift Package Index](https:\u002F\u002Fswiftpackageindex.com\u002Fscenee\u002FFloatingPanel\u002F3.2.1\u002Fdocumentation\u002Ffloatingpanel)\n- [FloatingPanel SwiftUI API Guide](\u002FDocumentation\u002FFloatingPanel%20SwiftUI%20API%20Guide.md)\n- [FloatingPanel API Guide](\u002FDocumentation\u002FFloatingPanel%20API%20Guide.md)\n- [FloatingPanel 2.0 Migration Guide](\u002FDocumentation\u002FFloatingPanel%202.0%20Migration%20Guide.md)\n\n## Installation\n\n### Swift Package Manager\n\n#### Using Xcode\n\nJust follow [this documentation](https:\u002F\u002Fdeveloper.apple.com\u002Fdocumentation\u002Fswift_packages\u002Fadding_package_dependencies_to_your_app).\n\n#### Using Package.swift\n\nIn your Package.swift Swift Package Manager manifest, add the following dependency to your dependencies argument:\n\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fscenee\u002FFloatingPanel\", from: \"3.2.1\"),\n```\n\nAdd Numerics as a dependency for your target:\n\n```swift\n.target(name: \"MyTarget\", dependencies: [\n  .product(name: \"FloatingPanel\", package: \"FloatingPanel\"),\n  \"AnotherModule\"\n]),\n```\n\nAnd then add `import FloatingPanel` in your source code.\n\n### CocoaPods\n\nFloatingPanel is available through [CocoaPods](https:\u002F\u002Fcocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'FloatingPanel'\n```\n\n## Getting Started with SwiftUI\n\n### Adding a floating panel within a view\n\n```swift\n@State private var layout = MyFloatingPanelLayout()\n@State private var state: FloatingPanelState?\n\nvar view: some View {\n  MainView()\n      .floatingPanel { proxy in\n          ScrollView {\n              VStack(spacing: 20) {\n                  ForEach(items) { item in\n                      ItemRow(item)\n                  }\n              }\n              .padding()\n          }\n          .floatingPanelScrollTracking(proxy: proxy)\n      }\n      .floatingPanelState($state)\n      .floatingPanelLayout(layout)\n      .floatingPanelBehavior(MyCustomBehavior())\n      .floatingPanelSurfaceAppearance(.transparent)\n}\n```\n\n### Presenting a floating panel modally within a view\n\nPlease define a custom coordinator object to present a floating panel as a modality.\n\n```swift\nstruct HomeView: View {\n  var view: some View {\n    MainView()\n        .floatingPanel(\n          coordinator: MyPanelCoordinator.self\n        ) { proxy in\n          ...\n        }\n  }\n}\n\nclass MyPanelCoordinator: FloatingPanelCoordinator {\n    ...\n    func setupFloatingPanel\u003CMain, Content>(\n        mainHostingController: UIHostingController\u003CMain>,\n        contentHostingController: UIHostingController\u003CContent>\n    ) where Main: View, Content: View {\n        \u002F\u002F Set the delegate object\n        controller.delegate = delegate\n\n        \u002F\u002F Set up the content\n        contentHostingController.view.backgroundColor = .clear\n        controller.set(contentViewController: contentHostingController)\n\n        \u002F* =============== HERE ==================== *\u002F\n        \u002F\u002F NOTE: \n        \u002F\u002F Present the floating panel on the next run loop cycle\n        \u002F\u002F to ensure proper view hierarchy setup.\n        Task { @MainActor in\n            mainHostingController.present(controller, animated: false)\n        }\n    }\n    ...\n}\n```\n\n### Displaying multiple panels\n  \nMultiple floating panels can be displayed in the same view hierarchy. To customize the layout and behavior for each Floating Panel individually, place modifiers directly below each panel.\n\n```swift\nColor.orange\n    .ignoresSafeArea()\n    .floatingPanel(\n        coordinator: MyPanelCoordinator.self\n    ) { proxy in\n        ContentView(proxy: proxy)\n    }\n    .floatingPanelSurfaceAppearance(.transparent())\n    .floatingPanel(\n        coordinator: MyPanelCoordinator.self\n    ) { proxy in\n        ContentView(proxy: proxy)\n    }\n    .floatingPanelSurfaceAppearance(.transparent(cornerRadius: 24))\n```\n\n### Next step\n\nFor more details, see the [FloatingPanel SwiftUI API Guide](\u002FDocumentation\u002FFloatingPanel%20SwiftUI%20API%20Guide.md)\n\n## Getting Started with UIKit\n\n### Adding a floating panel as a child view controller\n\n```swift\nimport UIKit\nimport FloatingPanel\n\nclass ViewController: UIViewController, FloatingPanelControllerDelegate {\n    var fpc: FloatingPanelController!\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \u002F\u002F Initialize a `FloatingPanelController` object.\n        fpc = FloatingPanelController()\n\n        \u002F\u002F Assign self as the delegate of the controller.\n        fpc.delegate = self \u002F\u002F Optional\n\n        \u002F\u002F Set a content view controller.\n        let contentVC = ContentViewController()\n        fpc.set(contentViewController: contentVC)\n\n        \u002F\u002F Track a scroll view(or the siblings) in the content view controller.\n        fpc.track(scrollView: contentVC.tableView)\n\n        \u002F\u002F Add and show the views managed by the `FloatingPanelController` object to self.view.\n        fpc.addPanel(toParent: self)\n    }\n}\n```\n\n### Presenting a floating panel modally\n\n```swift\nlet fpc = FloatingPanelController()\nlet contentVC = ...\nfpc.set(contentViewController: contentVC)\n\nfpc.isRemovalInteractionEnabled = true \u002F\u002F Optional: Let it removable by a swipe-down\n\nself.present(fpc, animated: true, completion: nil)\n```\n\nYou can show a floating panel over UINavigationController from the container view controllers as a modality of `.overCurrentContext` style.\n\n> [!NOTE]\n> FloatingPanelController has the custom presentation controller. If you would like to customize the presentation\u002Fdismissal, please see [Transitioning](Sources\u002FTransitioning.swift).\n\n### Next step\n\nFor more details, see the [FloatingPanel API Guide](\u002FDocumentation\u002FFloatingPanel%20API%20Guide.md).\n\n## Maintainer\n\nShin Yamamoto \u003Cshin@scenee.com> | [@scenee](https:\u002F\u002Ftwitter.com\u002Fscenee)\n\n## License\n\nFloatingPanel is available under the MIT license. See the LICENSE file for more info.\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=scenee\u002FFloatingPanel&type=date&legend=top-left)](https:\u002F\u002Fwww.star-history.com\u002F#scenee\u002FFloatingPanel&type=date&legend=top-left)\n\n","FloatingPanel 是一个简洁易用的浮动面板 UI 组件，专为 iOS 设计。它支持流畅的行为、滚动视图跟踪、移除交互以及多面板显示等功能，并且兼容所有屏幕方向和多种布局位置（顶部、左侧、底部、右侧）。此外，该组件还提供了多个磁性锚点选项，支持常见UI元素如表面、背景和抓取手柄等，同时避免了常见的自动布局和手势处理问题。适用于需要在主内容旁边展示相关数据或工具的应用场景，比如地图应用中的路线详情、股票应用中的股票信息等。项目使用 Swift 语言编写，兼容 iOS 12.0 及以上版本，并且支持 SwiftUI 和 Objective-C。","2026-06-11 03:09:01","top_language"]