{"id":13496150,"url":"https://github.com/finn-no/BottomSheet","last_synced_at":"2025-03-28T18:31:37.741Z","repository":{"id":38291389,"uuid":"220975561","full_name":"finn-no/BottomSheet","owner":"finn-no","description":"Custom modal presentation style for thumb-friendly interactive views","archived":false,"fork":false,"pushed_at":"2024-10-16T19:00:35.000Z","size":396,"stargazers_count":373,"open_issues_count":5,"forks_count":38,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-19T15:29:25.816Z","etag":null,"topics":["bottomsheet","ios","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finn-no.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-11-11T12:22:04.000Z","updated_at":"2024-10-16T19:00:38.000Z","dependencies_parsed_at":"2024-10-19T01:18:40.175Z","dependency_job_id":null,"html_url":"https://github.com/finn-no/BottomSheet","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finn-no%2FBottomSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finn-no%2FBottomSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finn-no%2FBottomSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finn-no%2FBottomSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finn-no","download_url":"https://codeload.github.com/finn-no/BottomSheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222403012,"owners_count":16978775,"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","ios","swift"],"created_at":"2024-07-31T19:01:43.034Z","updated_at":"2024-10-31T11:30:51.118Z","avatar_url":"https://github.com/finn-no.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"\u003cimg src=\"/GitHub/bottom-sheet-banner.png\"\u003e\n\n[![CircleCI](https://img.shields.io/circleci/project/github/finn-no/BottomSheet/master.svg)](https://circleci.com/gh/finn-no/BottomSheet/tree/master)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods compatible](https://img.shields.io/cocoapods/v/FINNBottomSheet.svg)](https://cocoapods.org/pods/FINNBottomSheet)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n\n**BottomSheet** is an implementation of custom modal presentation style for thumb-friendly interactive views anchored to the bottom of the screen.\n\n- [x] Custom `UIViewControllerTransitioningDelegate` for dismissable modal bottom sheets\n- [x] `BottomSheetView` for displaying complementary content as a standard bottom sheet view\n- [x] Expanding bottom sheets with multiple states to transition between\n- [x] Support for automatic view height based on Auto Layout constraints\n- [x] Beatiful spring animation\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/GitHub/demo.gif\"/\u003e\n\u003c/p\u003e\n\n## Installation\n\n**BottomSheet** is available through [Carthage](https://github.com/Carthage/Carthage). Append this line to your `Cartfile`:\n\n```ruby\ngithub \"finn-no/BottomSheet\"\n```\n\n**BottomSheet** is also available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod \"FINNBottomSheet\", git: \"https://github.com/finn-no/BottomSheet.git\"\n```\n\nTo integrate using Apple's Swift package manager, add the following as a dependency to your Package.swift:\n\n```swift\n.package(name: \"FINNBottomSheet\", url: \"https://github.com/finn-no/BottomSheet.git\", .upToNextMajor(from: \"1.0.0\"))\n```\n\n## Usage\n\nView controller -based presentation:\n\n```swift\nimport FINNBottomSheet\n\nlet transitioningDelegate = BottomSheetTransitioningDelegate(\n    contentHeights: [.bottomSheetAutomatic, UIScreen.main.bounds.size.height - 200],\n    startTargetIndex: 0\n)\nlet viewController = UIViewController()\nviewController.transitioningDelegate = transitioningDelegate\nviewController.modalPresentationStyle = .custom\n\npresent(viewController, animated: true)\n```\n\nView -based presentation:\n\n```swift\nimport FINNBottomSheet\n\nlet contentView = UIView()\ncontentView.backgroundColor = .red\n\nlet bottomSheetView = BottomSheetView(\n    contentView: contentView,\n    contentHeights: [100, 500]\n)\n\n// Can be presented in any UIView subclass\nbottomSheetView.present(in: viewController.view, targetIndex: 0)\n```\n\n## Known limitations\n\n### Using `.bottomSheetAutomatic`:\n\nWhen using `.bottomSheetAutomatic` to calculate the content height and your view is constrained using the `layoutMarginsGuide`, you must be aware that the returned content height may actually be higher than the compressed layout size of your view. Also, it may result in the transition animation freezing. This problem is avoided simply by not using the `layoutMarginsGuide`.\n\n### BottomSheetTransitioningDelegate\n\nTo avoid \"glitches\" you might need to keep a strong reference to the transitioning delegate (`BottomSheetTransitioningDelegate`) until the bottom sheet animation is complete.\n\n## Create new releases\n\n### Setup\n- Install dependencies with `bundle install` (dependencies will be installed in `./bundler`)\n- Fastlane will use the GitHub API, so make sure to create a personal access token [here](https://github.com/settings/tokens) and place it within an environment variable called **`FINN_GITHUB_COM_ACCESS_TOKEN`**.\n  - When creating a token, you only need to give access to the scope `repo`.\n  - There are multiple ways to make an environment variable, for example by using a `.env` file or adding it to `.bashrc`/`.bash_profile`). Don't forget to run `source .env` (for whichever file you set the environment variables in) if you don't want to restart your shell.\n  - Run `bundle exec fastlane verify_environment_variable` to see if it is configured correctly.\n- Run `bundle exec fastlane verify_ssh_to_github` to see if ssh to GitHub is working.\n\n### Make release\n- Run `bundle exec fastlane` and choose appropriate lane. Follow instructions, you will be asked for confirmation before all remote changes.\n- After the release has been created you can edit the description on GitHub by using the printed link.\n\n## Interesting things\n\n### Changelogs\n\nThis project has a `Gemfile` that specify some development dependencies, one of those is `pr_changelog` which is a tool that helps you to generate changelogs from the Git history of the repo. You install this by running `bundle install`.\n\nTo get the changes that have not been released yet just run:\n\n```\n$ pr_changelog\n```\n\nIf you want to see what changes were released in the last version, run:\n\n```\n$ pr_changelog --last-release\n```\n\nYou can always run the command with the `--help` flag when needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinn-no%2FBottomSheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinn-no%2FBottomSheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinn-no%2FBottomSheet/lists"}