{"id":15038068,"url":"https://github.com/applidium/overlaycontainer","last_synced_at":"2025-04-08T12:06:25.973Z","repository":{"id":33764105,"uuid":"160369795","full_name":"applidium/OverlayContainer","owner":"applidium","description":"Non-intrusive iOS UI library to implement overlay based interfaces","archived":false,"fork":false,"pushed_at":"2024-05-15T23:16:23.000Z","size":19171,"stargazers_count":1153,"open_issues_count":4,"forks_count":94,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-10-29T15:40:29.344Z","etag":null,"topics":["bottomsheet","floating","ios","overlay","panel","uikit"],"latest_commit_sha":null,"homepage":"https://gaetanzanella.github.io/2018-12-17/replicating-apple-maps-overlay","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/applidium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-04T14:25:57.000Z","updated_at":"2024-10-28T15:29:06.000Z","dependencies_parsed_at":"2024-06-18T16:42:38.540Z","dependency_job_id":"e9cc50dd-2e8f-41e3-a127-cbd2e4032d36","html_url":"https://github.com/applidium/OverlayContainer","commit_stats":{"total_commits":297,"total_committers":9,"mean_commits":33.0,"dds":0.0505050505050505,"last_synced_commit":"aa7bd207141189d45ecc96b550bb7298859652cd"},"previous_names":["applidium/adoverlaycontainer"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applidium%2FOverlayContainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applidium%2FOverlayContainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applidium%2FOverlayContainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applidium%2FOverlayContainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applidium","download_url":"https://codeload.github.com/applidium/OverlayContainer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838443,"owners_count":21004580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bottomsheet","floating","ios","overlay","panel","uikit"],"created_at":"2024-09-24T20:36:57.796Z","updated_at":"2025-04-08T12:06:25.954Z","avatar_url":"https://github.com/applidium.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cH4 align=\"center\"\u003e\n  OverlayContainer is a UI library written in Swift. It makes easier to develop overlay based interfaces, such as the one presented in the Apple Maps, Stocks or Shortcuts apps\n\u003c/H4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://developer.apple.com/\"\u003e\u003cimg alt=\"Platform\" src=\"https://img.shields.io/badge/platform-iOS-green.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg alt=\"Swift4\" src=\"https://img.shields.io/badge/language-Swift%204.2-orange.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://developer.apple.com/swift\"\u003e\u003cimg alt=\"Swift5\" src=\"https://img.shields.io/badge/language-Swift%205.0-orange.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://cocoapods.org/pods/OverlayContainer\"\u003e\u003cimg alt=\"CocoaPods\" src=\"https://img.shields.io/cocoapods/v/OverlayContainer.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg alt=\"Carthage\" src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/applidium/OverlayContainer/actions\"\u003e\u003cimg alt=\"Build Status\" src=\"https://github.com/applidium/OverlayContainer/workflows/CI/badge.svg?branch=master\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/applidium/ADOverlayContainer/blob/master/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/cocoapods/l/OverlayContainer.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e ⚠️ In iOS 15, consider using [UISheetPresentationController](https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller) before `OverlayContainer`\n\n---\n\n`OverlayContainer` tries to be as lightweight and non-intrusive as possible. The layout and the UI customization are done by you to avoid to corrupt your project. \n\nIt perfectly mimics the overlay presented in the Siri Shotcuts app. See [this article](https://gaetanzanella.github.io//2018/replicate-apple-maps-overlay/) for details.\n\n- [x] Unlimited notches\n- [x] Notches modifiable at runtime\n- [x] Adaptive to any custom layouts\n- [x] Rubber band effect\n- [x] Animations and target notch policy fully customizable\n- [x] Unit tested\n\nSee the provided examples for help or feel free to ask directly.\n\n---\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/applidium/ADOverlayContainer/blob/master/Assets/scroll.gif\" width=\"222\"\u003e\n\u003c/p\u003e\n\n---\n\n- [Usage](#usage)\n  - [Setup](#setup)\n  - [Overlay style](#overlay-style)\n  - [Scroll view support](#scroll-view-support)\n  - [Pan gesture support](#pan-gesture-support)\n  - [Tracking the overlay](#tracking-the-overlay)\n  - [Examples](#examples)\n- [Advanced Usage](#advanced-usage)\n  - [Multiple overlays](#multiple-overlays)\n  - [Presenting an overlay container](#presenting-an-overlay-container)\n  - [Enabling \u0026 disabling notches](#enabling--disabling-notches)\n  - [Backdrop view](#backdrop-view)\n  - [Safe Area issues](#safe-area-issues)\n  - [Custom Translation](#custom-translation)\n  - [Custom Translation Animations](#custom-translation-animations)\n  - [Reloading the notches](#reloading-the-notches)\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [CocoaPods](#cocoapods)\n  - [Carthage](#carthage)\n  - [Swift Package Manager](#swift-package-manager)\n- [SwiftUI](#swiftui)\n- [Author](#author)\n- [License](#license)\n\n## Usage\n\n### Setup\n\nThe main component of the library is the `OverlayContainerViewController`. It defines an area where a view controller, called the overlay view controller, can be dragged up and down, hiding or revealing the content underneath it.\n\n`OverlayContainer` uses the last view controller of its `viewControllers` as the overlay view controller. It stacks the other view controllers on top of each other, if any, and adds them underneath the overlay view controller.\n\nA startup sequence might look like this:\n\n```swift\nlet mapsController = MapsViewController()\nlet searchController = SearchViewController()\n\nlet containerController = OverlayContainerViewController()\ncontainerController.delegate = self\ncontainerController.viewControllers = [\n    mapsController,\n    searchController\n]\n\nwindow?.rootViewController = containerController\n```\n\nSpecifing only one view controller is absolutely valid. For instance, in [MapsLikeViewController](https://github.com/applidium/OverlayContainer/blob/master/Example/OverlayContainer_Example/Maps/MapsLikeViewController.swift) the overlay only covers partially its content.\n\nThe overlay container view controller needs at least one notch. Implement `OverlayContainerViewControllerDelegate` to specify the number of notches wished:\n\n```swift\nenum OverlayNotch: Int, CaseIterable {\n    case minimum, medium, maximum\n}\n\nfunc numberOfNotches(in containerViewController: OverlayContainerViewController) -\u003e Int {\n    return OverlayNotch.allCases.count\n}\n\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    heightForNotchAt index: Int,\n                                    availableSpace: CGFloat) -\u003e CGFloat {\n    switch OverlayNotch.allCases[index] {\n        case .maximum:\n            return availableSpace * 3 / 4\n        case .medium:\n            return availableSpace / 2\n        case .minimum:\n            return availableSpace * 1 / 4\n    }\n}\n```\n\n### Overlay style\n\nThe overlay style defines how the overlay view controller will be constrained in the `OverlayContainerViewController`.\n\n```swift\nenum OverlayStyle {\n    case flexibleHeight\n    case rigid\n    case expandableHeight // default\n}\n\nlet overlayContainer = OverlayContainerViewController(style: .rigid)\n```\n\n* rigid\n\n![rigid](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/rigid.gif)\n\nThe overlay view controller will be constrained with a height equal to the highest notch. The overlay won't be fully visible until the user drags it up to this notch.\n\n* flexibleHeight\n\n![flexible](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/flexible.gif)\n\nThe overlay view controller will not be height-constrained. It will grow and shrink as the user drags it up and down.\n\nNote though that while the user is dragging the overlay, the overlay's view may perform some extra layout computations. This is specially true for the table views or the collection views : some cells may be dequeued or removed when its frame changes. Try `.rigid` if you encounter performance issues.\n\n**Be careful to always provide a minimum height higher than the intrinsic content of your overlay.**\n\n* expandableHeight\n\n![expandable](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/expandable.gif)\n\nThe overlay view controller will be constrained with a height greater or equal to the highest notch. Its height will be expanded if the overlay goes beyond the highest notch (it could happen if the translation function or the animation controller allow it).\n\n### Scroll view support\n\nThe container view controller can coordinate the scrolling of a scroll view with the overlay translation.\n\n![scrollToTranslation](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/scrollToTranslation.gif)\n\nUse the dedicated delegate method:\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    scrollViewDrivingOverlay overlayViewController: UIViewController) -\u003e UIScrollView? {\n    return (overlayViewController as? DetailViewController)?.tableView\n}\n```\n\nOr directly set the dedicated property:\n\n```swift\nlet containerController = OverlayContainerViewController()\ncontainerController.drivingScrollView = myScrollView\n```\n\nMake sure to set `UIScrollView.alwaysBounceVertical` to `true` so the scroll view will always scroll regardless of its content size.\n\n### Pan gesture support\n\nThe container view controller detects pan gestures on its own view.\nUse the dedicated delegate method to check that the specified starting pan gesture location corresponds to a grabbable view in your custom overlay.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    shouldStartDraggingOverlay overlayViewController: UIViewController,\n                                    at point: CGPoint,\n                                    in coordinateSpace: UICoordinateSpace) -\u003e Bool {\n    guard let header = (overlayViewController as? DetailViewController)?.header else {\n        return false\n    }\n    let convertedPoint = coordinateSpace.convert(point, to: header)\n    return header.bounds.contains(convertedPoint)\n}\n```\n\n### Tracking the overlay\n\nYou can track the overlay motions using the dedicated delegate methods:\n\n- Translation Start\n\nTells the delegate when the user is about to start dragging the overlay view controller.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    willStartDraggingOverlay overlayViewController: UIViewController)\n```\n\n- Translation End\n\nTells the delegate when the user finishs dragging the overlay view controller with the specified velocity.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    willEndDraggingOverlay overlayViewController: UIViewController,\n                                    atVelocity velocity: CGPoint)\n```\n\n- Translation In Progress\n\nTells the delegate when the container is about to move the overlay view controller to the specified notch.\n\nIn some cases, the overlay view controller may not successfully reach the specified notch.\nIf the user cancels the translation for instance. Use `overlayContainerViewController(_:didMove:toNotchAt:)` if you need to be notified each time the translation succeeds.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    willMoveOverlay overlayViewController: UIViewController,\n                                    toNotchAt index: Int)\n```\n\nTells the delegate when the container has moved the overlay view controller to the specified notch.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    didMoveOverlay overlayViewController: UIViewController,\n                                    toNotchAt index: Int)\n```\n\nTells the delegate whenever the overlay view controller is about to be translated.\n\nThe delegate typically implements this method to coordinate changes alongside the overlay view controller's translation.\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    willTranslateOverlay overlayViewController: UIViewController,\n                                    transitionCoordinator: OverlayContainerTransitionCoordinator)\n```\n\nThe `transition coordinator` provides information about the translation that is about to start:\n\n```swift\n/// A Boolean value that indicates whether the user is current dragging the overlay.\nvar isDragging: Bool { get }\n\n/// The overlay velocity.\nvar velocity: CGPoint { get }\n\n/// The current translation height.\nvar overlayTranslationHeight: CGFloat { get }\n\n/// The notch indexes.\nvar notchIndexes: Range\u003cInt\u003e { get }\n\n/// The reachable indexes. Some indexes might be disabled by the `canReachNotchAt` delegate method.\nvar reachableIndexes: [Int] { get }\n\n/// Returns the height of the specified notch.\nfunc height(forNotchAt index: Int) -\u003e CGFloat\n\n/// A Boolean value indicating whether the transition is explicitly animated.\nvar isAnimated: Bool { get }\n\n/// A Boolean value indicating whether the transition was cancelled.\nvar isCancelled: Bool { get }\n\n/// The overlay height the container expects to reach.\nvar targetTranslationHeight: CGFloat { get }\n```\nand allows you to add animations alongside it:\n\n```swift\ntransitionCoordinator.animate(alongsideTransition: { context in\n    // ...\n}, completion: nil)\n```\n\n### Examples\n\nTo test the examples, open `OverlayContainer.xcworkspace` and run the `OverlayContainer_Example` target.\n\nChoose the layout you wish to display in the `AppDelegate`:\n\n* MapsLikeViewController: A custom layout which adapts its hierachy on rotations.\n\n![Maps](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/maps.gif)\n\n* ShortcutsLikeViewController: A custom layout which adapts its hierachy on trait collection changes: Moving from a `UISplitViewController` on regular environment to a simple `StackViewController` on compact environment. Visualize it on an iPad Pro.\n\n![Shortcuts](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/shortcuts.gif)\n\n## Advanced usage\n\n### Multiple overlays\n\n`OverlayContainer` does not provide a built-in view controller navigation management. It focuses its effort on the overlay translation.\n\nHowever in the project, there is an example of a basic solution to overlay multiple overlays on top of each other, like in the `Apple Maps` app. It is based on an `UINavigationController` and a custom implementation of its delegate:\n\n```swift\n// MARK: - UINavigationControllerDelegate\n\nfunc navigationController(_ navigationController: UINavigationController,\n                          animationControllerFor operation: UINavigationController.Operation,\n                          from fromVC: UIViewController,\n                          to toVC: UIViewController) -\u003e UIViewControllerAnimatedTransitioning? {\n    return OverlayNavigationAnimationController(operation: operation)\n}\n\nfunc navigationController(_ navigationController: UINavigationController,\n                          didShow viewController: UIViewController,\n                          animated: Bool) {\n    overlayController.drivingScrollView = (viewController as? SearchViewController)?.tableView\n}\n```\n\n`OverlayNavigationAnimationController` tweaks the native behavior of the `UINavigationController`: it slides the pushed view controllers up from the bottom of the screen. Feel free to add shadows and modify the animation curve depending on your needs. The only restriction is that you can not push an `UINavigationController` inside another `UINavigationController`.\n\n### Presenting an overlay container\n\nThe translation of an overlay view controller can be coupled with the presentation state of its container. Subclass `OverlayContainerPresentationController` to be notified any time an overlay translation occurs in the presented content or use the built-in `OverlayContainerSheetPresentationController` class.\n\nA frequent use case is to reproduce the presentation style of an `UIActivityViewController`. [ActivityControllerPresentationLikeViewController](https://github.com/applidium/OverlayContainer/blob/master/Example/OverlayContainer_Example/Present%20Overlay/ActivityControllerPresentationLikeViewController.swift) provides a basic implementation of it:\n\n```swift\nfunc displayActivityLikeViewController() {\n    let container = OverlayContainerViewController()\n    container.viewControllers = [MyActivityViewController()]\n    container.transitioningDelegate = self\n    container.modalPresentationStyle = .custom\n    present(container, animated: true, completion: nil)\n}\n\n// MARK: - UIViewControllerTransitioningDelegate\n\nfunc presentationController(forPresented presented: UIViewController,\n                            presenting: UIViewController?,\n                            source: UIViewController) -\u003e UIPresentationController? {\n    return OverlayContainerSheetPresentationController(\n        presentedViewController: presented,\n        presenting: presenting\n    )\n}\n```\n\nIf the user taps the background content or drags the overlay down fastly, the container controller will be automatically dismissed.\n\n### Enabling \u0026 disabling notches\n\n`OverlayContainer` provides a easy way to enable \u0026 disable notches on the fly. A frequent use case is to show \u0026 hide the overlay. [ShowOverlayExampleViewController](https://github.com/applidium/OverlayContainer/blob/master/Example/OverlayContainer_Example/Disable%20Notch/ShowOverlayExampleViewController.swift) provides a basic implementation of it:\n\n```swift\nvar showsOverlay = false\n\nfunc showOrHideOverlay() {\n    showsOverlay.toggle()\n    let targetNotch: Notch = showsOverlay ? .med : .hidden\n    overlayContainerController.moveOverlay(toNotchAt: targetNotch.rawValue, animated: true)\n}\n\n// MARK: - OverlayContainerViewControllerDelegate\n\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    heightForNotchAt index: Int,\n                                    availableSpace: CGFloat) -\u003e CGFloat {\n    switch Notch.allCases[index] {\n    case .max:\n        return ...\n    case .med:\n        return ...\n    case .hidden:\n        return 0\n    }\n}\n\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    canReachNotchAt index: Int,\n                                    forOverlay overlayViewController: UIViewController) -\u003e Bool {\n    switch Notch.allCases[index] {\n    case .max:\n        return showsOverlay\n    case .med:\n        return showsOverlay\n    case .hidden:\n        return !showsOverlay\n    }\n}\n```\n\nMake sure to use the `rigid` overlay style if the content can not be flattened.\n\n### Backdrop view\n\nCoordinate the overlay movements to the aspect of a view using the dedicated delegate methods. See the [backdrop view example](https://github.com/applidium/OverlayContainer/blob/master/Example/OverlayContainer_Example/Backdrop/BackdropExampleViewController.swift).\n\n![backdrop](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/backdropView.gif)\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    willTranslateOverlay overlayViewController: UIViewController,\n                                    transitionCoordinator: OverlayContainerTransitionCoordinator) {\n    transitionCoordinator.animate(alongsideTransition: { [weak self] context in\n        self?.backdropViewController.view.alpha = context.translationProgress()\n    }, completion: nil)\n}\n```\n\n### Safe Area issues\n\nBe careful when using safe areas. As described in the [WWDC \"UIKit: Apps for Every Size and Shape\" video](https://masterer.apple.com/videos/play/wwdc2018-235/?time=328), the safe area insets will not be updated if your views exceeds the screen bounds. This is specially the case when using the `OverlayStyle.expandableHeight`: when the overlay exceeds the bottom screen limit, its safe area will not be updated.\n\nThe simpliest way to handle the safe area correctly is to compute your notch heights using the `safeAreaInsets` of the container and avoid the `safeAreaLayoutGuide` use in your overlay view:\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    heightForNotchAt index: Int,\n                                    availableSpace: CGFloat) -\u003e CGFloat {\n    let bottomInset = containerViewController.view.safeAreaInsets.bottom\n    switch OverlayNotch.allCases[index] {\n\n        // ...\n\n        case .minimum:\n            return bottomInset + 100\n    }\n}\n```\n\nIf you depend on `UIKit` native components that do not ignore the safe area like a `UINavigationBar`, use the `OverlayStyle.flexibleHeight` style.\n\n### Custom Translation\n\nAdopt `OverlayTranslationFunction` to modify the relation between the user's finger translation and the actual overlay translation.\n\nBy default, the overlay container uses a `RubberBandOverlayTranslationFunction` that provides a rubber band effect.\n\n![rubberBand](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/rubberBand.gif)\n\n```swift\nfunc overlayContainerViewController(_ containerViewController: OverlayContainerViewController,\n                                    overlayTranslationFunctionForOverlay overlayViewController: UIViewController) -\u003e OverlayTranslationFunction? {\n    let function = RubberBandOverlayTranslationFunction()\n    function.factor = 0.7\n    function.bouncesAtMinimumHeight = false\n    return function\n}\n```\n\n### Custom Translation Animations\n\nAdopt `OverlayTranslationTargetNotchPolicy` \u0026 `OverlayAnimatedTransitioning` protocols to define where the overlay should go once the user's touch is released and how to animate the translation.\n\nBy default, the overlay container uses a `SpringOverlayTranslationAnimationController` that mimics the behavior of a spring.\nThe associated target notch policy `RushingForwardTargetNotchPolicy` will always try to go forward if the user's finger reachs a certain velocity. It might also decide to skip some notches if the user goes too fast.\n\nTweak the provided implementations or implement our own objects to modify the overlay translation behavior.\n\n![animations](https://github.com/applidium/ADOverlayContainer/blob/master/Assets/animations.gif)\n\n```swift\n\nfunc overlayTargetNotchPolicy(for overlayViewController: UIViewController) -\u003e OverlayTranslationTargetNotchPolicy? {\n    let policy = RushingForwardTargetNotchPolicy()\n    policy.minimumVelocity = 0\n    return policy\n}\n\nfunc animationController(for overlayViewController: UIViewController) -\u003e OverlayAnimatedTransitioning? {\n    let controller = SpringOverlayTranslationAnimationController()\n    controller.damping = 0.2\n    return controller\n}\n```\n\n### Reloading the notches\n\nYou can reload all the data that is used to construct the notches using the dedicated method:\n\n```swift\nfunc invalidateNotchHeights()\n```\n\nThis method does not reload the notch heights immediately. It only clears the current container's state. Because the number of notches may change, the container will use its target notch policy to determine where to go.\nCall `moveOverlay(toNotchAt:animated:)` to override this behavior.\n\n## Requirements\n\nOverlayContainer is written in Swift 5. Compatible with iOS 10.0+.\n\n## Installation\n\nOverlayContainer is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n### Cocoapods\n\n```ruby\npod 'OverlayContainer'\n```\n\n### Carthage\n\nAdd the following to your Cartfile:\n\n```ruby\ngithub \"https://github.com/applidium/OverlayContainer\"\n```\n\n### Swift Package Manager\n\nOverlayContainer can be installed as a Swift Package with Xcode 11 or higher. To install it, add a package using Xcode or a dependency to your Package.swift file:\n\n```swift\n.package(url: \"https://github.com/applidium/OverlayContainer.git\", from: \"3.4.0\")\n```\n\n\n## SwiftUI\n\nSee [DynamicOverlay](https://github.com/faberNovel/DynamicOverlay)\n\n## Author\n\n[@gaetanzanella](https://twitter.com/gaetanzanella), gaetan.zanella@fabernovel.com\n\n## License\n\nOverlayContainer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplidium%2Foverlaycontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplidium%2Foverlaycontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplidium%2Foverlaycontainer/lists"}