All Projects → finn-no → Bottomsheet

finn-no / Bottomsheet

Licence: mit
Custom modal presentation style for thumb-friendly interactive views

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Bottomsheet

Androidbottomsheet
Provides a bottom sheet as proposed by Android's Material design guidelines.
Stars: ✭ 337 (+206.36%)
Mutual labels:  bottomsheet
Bottomsheetexample
Example app for Android BottomSheet
Stars: ✭ 21 (-80.91%)
Mutual labels:  bottomsheet
Fluentappbar
Fluent App Bar: An Android bottom-sheet-based navigation bar based on Microsoft's Fluent Design System
Stars: ✭ 88 (-20%)
Mutual labels:  bottomsheet
Sheets
⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
Stars: ✭ 441 (+300.91%)
Mutual labels:  bottomsheet
Anylayer
Android稳定高效的浮层创建管理框架
Stars: ✭ 745 (+577.27%)
Mutual labels:  bottomsheet
Tc Material Design
Série de artigos sobre o Material Design Android
Stars: ✭ 64 (-41.82%)
Mutual labels:  bottomsheet
Cornersheet
Behavior to expand view from corner
Stars: ✭ 274 (+149.09%)
Mutual labels:  bottomsheet
React Native Draggable View
DraggableView is a component for react-native, it allows you have a vertical draggable drawer view that you can drag up or drag down. So, if you drag and release that component, then it keeps moving until reach either initial position or container border.
Stars: ✭ 103 (-6.36%)
Mutual labels:  bottomsheet
Overlaycontainer
Non-intrusive iOS UI library to implement overlay based interfaces
Stars: ✭ 777 (+606.36%)
Mutual labels:  bottomsheet
Stickytabbarviewcontroller
Sticky and Collapsible View on top of tab bar
Stars: ✭ 82 (-25.45%)
Mutual labels:  bottomsheet
Superbottomsheet
Android native BottomSheet on steroids 💪
Stars: ✭ 548 (+398.18%)
Mutual labels:  bottomsheet
Hwpanmodal
HWPanModal presents controller from bottom and drag to dismiss, high customize. iOS13 default modalPresentationStyle. 任意形式的底部弹框动画;头条、知乎、抖音弹出评论效果;地图浮层,iOS13 present默认模态效果。
Stars: ✭ 713 (+548.18%)
Mutual labels:  bottomsheet
React Native Scroll Bottom Sheet
Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land 🔥
Stars: ✭ 1,226 (+1014.55%)
Mutual labels:  bottomsheet
Modalbottomsheetdialogfragment
Modal bottom sheet dialog based on the Material Guidelines
Stars: ✭ 421 (+282.73%)
Mutual labels:  bottomsheet
Xam.plugin.simplebottomdrawer
Just a nice and simple BottomDrawer for your Xamarin Forms project
Stars: ✭ 92 (-16.36%)
Mutual labels:  bottomsheet
Gtsheet
An easy to integrate solution for presenting UIViewControllers in a bottom sheet
Stars: ✭ 282 (+156.36%)
Mutual labels:  bottomsheet
React Native Bottom Sheet Behavior
react-native wrapper for android BottomSheetBehavior
Stars: ✭ 1,068 (+870.91%)
Mutual labels:  bottomsheet
React Swipeable Bottom Sheet
A swipeable material's bottom sheet implementation, using react-swipeable-views
Stars: ✭ 106 (-3.64%)
Mutual labels:  bottomsheet
Bottomify Navigation View
A nice looking Spotify like bottom navigation view
Stars: ✭ 97 (-11.82%)
Mutual labels:  bottomsheet
React Native Bottomsheet Reanimated
React Native bottom sheet with fully native 60 FPS animations and awesome user experience
Stars: ✭ 80 (-27.27%)
Mutual labels:  bottomsheet

CircleCI Carthage compatible CocoaPods compatible Swift Package Manager compatible

BottomSheet is an implementation of custom modal presentation style for thumb-friendly interactive views anchored to the bottom of the screen.

  • [x] Custom UIViewControllerTransitioningDelegate for dismissable modal bottom sheets
  • [x] BottomSheetView for displaying complementary content as a standard bottom sheet view
  • [x] Expanding bottom sheets with multiple states to transition between
  • [x] Support for automatic view height based on Auto Layout constraints
  • [x] Beatiful spring animation

Demo

Installation

BottomSheet is available through Carthage. Append this line to your Cartfile:

github "finn-no/BottomSheet"

BottomSheet is also available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "FINNBottomSheet", git: "https://github.com/finn-no/BottomSheet.git"

To integrate using Apple's Swift package manager, add the following as a dependency to your Package.swift:

.package(name: "FINNBottomSheet", url: "https://github.com/finn-no/BottomSheet.git", .upToNextMajor(from: "1.0.0"))

Usage

View controller -based presentation:

import FINNBottomSheet

let transitioningDelegate = BottomSheetTransitioningDelegate(
    contentHeights: [.bottomSheetAutomatic, UIScreen.main.bounds.size.height - 200],
    startTargetIndex: 0
)
let viewController = UIViewController()
viewController.transitioningDelegate = transitioningDelegate
viewController.modalPresentationStyle = .custom

present(viewController, animated: true)

View -based presentation:

import FINNBottomSheet

let contentView = UIView()
contentView.backgroundColor = .red

let bottomSheetView = BottomSheetView(
    contentView: contentView,
    contentHeights: [100, 500]
)

// Can be presented in any UIView subclass
bottomSheetView.present(in: viewController.view, targetIndex: 0)

Known limitations

Using .bottomSheetAutomatic:

When 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.

BottomSheetTransitioningDelegate

To avoid "glitches" you might need to keep a strong reference to the transitioning delegate (BottomSheetTransitioningDelegate) until the bottom sheet animation is complete.

Create new releases

Setup

  • Install dependencies with bundle install (dependencies will be installed in ./bundler)
  • Fastlane will use the GitHub API, so make sure to create a personal access token here and place it within an environment variable called FINN_GITHUB_COM_ACCESS_TOKEN.
    • When creating a token, you only need to give access to the scope repo.
    • 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.
    • Run bundle exec fastlane verify_environment_variable to see if it is configured correctly.
  • Run bundle exec fastlane verify_ssh_to_github to see if ssh to GitHub is working.

Make release

  • Run bundle exec fastlane and choose appropriate lane. Follow instructions, you will be asked for confirmation before all remote changes.
  • After the release has been created you can edit the description on GitHub by using the printed link.

Interesting things

Changelogs

This 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.

To get the changes that have not been released yet just run:

$ pr_changelog

If you want to see what changes were released in the last version, run:

$ pr_changelog --last-release

You can always run the command with the --help flag when needed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].