🐝 Super ultra drawer view

Related tags

UI UltraDrawerView
Overview

UltraDrawerView

let headerView = HeaderView()
headerView.translatesAutoresizingMaskIntoConstraints = false
headerView.heightAnchor.constraint(equalToConstant: 64).isActive = true

let tableView = UITableView()

let drawerView = DrawerView(scrollView: tableView, delegate: self, headerView: headerView)
drawerView.availableStates = [.top, .middle, .bottom]
drawerView.middlePosition = .fromBottom(256)
drawerView.cornerRadius = 16
drawerView.containerView.backgroundColor = .white
drawerView.setState(.middle, animated: false)

// More fluctuations 
drawerView.animationParameters = .spring(mass: 1, stiffness: 200, dampingRatio: 0.5)

// Default UIScrollView like behavior
drawerView.animationParameters = .spring(.default)

Example

Example

To run the example project, clone the repo and run bundle exec pod install from the Example directory first.

Installation

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

pod 'UltraDrawerView'

Author

Ilya Lobanov

License

UltraDrawerView is available under the MIT license. See the LICENSE file for more info.

Comments
  • После удаления библиотеки pop начались проблемы с DrawerViewListener

    После удаления библиотеки pop начались проблемы с DrawerViewListener

    После удаления библиотеки pop начались следующие проблемы:

    1. Если свайпнуть DrawerView вверх из положения .middle в .top, то значение origin переданное в метод didUpdateOrigin не будет равно конечному значению.

    https://user-images.githubusercontent.com/410293/104882168-a1776680-5973-11eb-9e22-1101bf06cfb4.mov

    На видео видно что origin равен 84.00379903889234, а должен быть равен 84.0.

    1. Метод didUpdateOrigin стал вызываться после того как анимация завершилась. На видео выше видно что этот метод продолжает вызывается после завершения анимации. Если откатить на версию с библиотекой pop то такой проблемы нет.

    2. Метод didUpdateOrigin стал вызываться сильно чаще чем было до этого.

    Сейчас если свайпнуть DrawerView вверх из положения .middle в .top, то метод didUpdateOrigin вызовется 67 раз, а до удаления библиотеки pop этот метод вызывался 33 раза.

    Обсудить:

    Можно ли сделать так чтобы он вызывался только при изменении целой части значения origin? То есть вместо такого:

    86.85568667733486
    86.30025473571135
    85.5273588069822
    85.23997177933157
    84.99605378858263
    84.80715678836103
    84.6612911479868
    84.52847303222093
    84.43310181664573
    84.34548088841095
    84.28263115720186
    84.22836565102469
    84.18343991245922
    84.14671614414095
    84.11868051209942
    84.09659951398588
    84.07680739856822
    84.06187182913489
    84.04981766151992
    84.04036396309593
    84.03225499286657
    84.02619147637247
    84.02112442808475
    84.01677026171919
    84.01347722976746
    84.01082530400531
    84.00869548762955
    84.00698126842899
    84.00566759573098
    84.0044962094914
    84.00420290465807
    

    получить такое:

    86
    85
    84
    
    opened by subdan 4
  • Bump cocoapods-downloader from 1.5.1 to 1.6.3

    Bump cocoapods-downloader from 1.5.1 to 1.6.3

    Bumps cocoapods-downloader from 1.5.1 to 1.6.3.

    Release notes

    Sourced from cocoapods-downloader's releases.

    1.6.3

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.2

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.1

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.0

    Enhancements
    • None.
    Bug Fixes
    • Adds a check for command injections in the input for hg and git.
      orta #124
    Changelog

    Sourced from cocoapods-downloader's changelog.

    1.6.3 (2022-04-01)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.2 (2022-03-28)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.1 (2022-03-23)

    Enhancements
    • None.
    Bug Fixes
    • None.

    1.6.0 (2022-03-22)

    Enhancements
    • None.
    Bug Fixes
    • Adds a check for command injections in the input for hg and git.
      orta #124
    Commits
    • c03e2ed Release 1.6.3
    • f75bccc Disable Bazaar tests due to macOS 12.3 not including python2
    • 52a0d54 Merge pull request #128 from CocoaPods/validate_before_dl
    • d27c983 Ensure that the git pre-processor doesn't accidentally bail also
    • 3adfe1f [CHANGELOG] Add empty Master section
    • 591167a Release 1.6.2
    • d2564c3 Merge pull request #127 from CocoaPods/validate_before_dl
    • 99fec61 Switches where we check for invalid input, to move it inside the download fun...
    • 96679f2 [CHANGELOG] Add empty Master section
    • 3a7c54b Release 1.6.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Add bounces property

    Add bounces property

    In this PR I add bounces property to DrawerView so a user can disable bounce.

    When drawer.bounce = false drawer immediately stop moving in the lowest position. When drawer.bounce = true drawer stop moving in the lowest position using rubber band effect.

    Also I've fixed a bug where tapping on shape doesn’t trigger spring animation.

    Demo of drawer.bounce = false

    https://user-images.githubusercontent.com/410293/104280207-9e383280-54bc-11eb-8ba6-4a0d8db94d8d.mov

    To discuss I noticed that rubber band effect works only when a user interacts with a header view. When a user drag content view it doesn't use rubber band effect. What do you think about it? Is it possible to fix it? I tried to use clampTargetHeaderOrigin method inside drawerViewContentDidScroll but it doesn’t work.

    https://user-images.githubusercontent.com/410293/104280419-efe0bd00-54bc-11eb-88b4-af62768003d5.mov

    opened by subdan 1
  • Bump addressable from 2.7.0 to 2.8.0

    Bump addressable from 2.7.0 to 2.8.0

    Bumps addressable from 2.7.0 to 2.8.0.

    Changelog

    Sourced from addressable's changelog.

    Addressable 2.8.0

    • fixes ReDoS vulnerability in Addressable::Template#match
    • no longer replaces + with spaces in queries for non-http(s) schemes
    • fixed encoding ipv6 literals
    • the :compacted flag for normalized_query now dedupes parameters
    • fix broken escape_component alias
    • dropping support for Ruby 2.0 and 2.1
    • adding Ruby 3.0 compatibility for development tasks
    • drop support for rack-mount and remove Addressable::Template#generate
    • performance improvements
    • switch CI/CD to GitHub Actions
    Commits
    • 6469a23 Updating gemspec again
    • 2433638 Merge branch 'main' of github.com:sporkmonger/addressable into main
    • e9c76b8 Merge pull request #378 from ashmaroli/flat-map
    • 56c5cf7 Update the gemspec
    • c1fed1c Require a non-vulnerable rake
    • 0d8a312 Adding note about ReDoS vulnerability
    • 89c7613 Merge branch 'template-regexp' into main
    • cf8884f Note about alias fix
    • bb03f71 Merge pull request #371 from charleystran/add_missing_encode_component_doc_entry
    • 6d1d809 Adding note about :compacted normalization
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • didChangeState method doesn't triggered when scrolling content view

    didChangeState method doesn't triggered when scrolling content view

    When a user drags drawer from middle position to top position so that a content view starts to scroll, didChangeState method doesn't triggered.

    Steps to reproduce:

    1. Add listener drawerView.addListener(self)
    2. Add print to didChangeState method:
    func drawerView(_ drawerView: DrawerView, didChangeState state: DrawerView.State?) {
        print("new state = \(state)")        
    }
    
    1. Run app on iPhone 11
    2. Make pan gesture. Start position — triangle label. End position — clock on status bar.

    Actual result: Nothing happens.

    Expected result: The library must call didChangeState method and pass new state (top).

    Video demo of the issue:

    https://user-images.githubusercontent.com/410293/104569852-463b3080-5662-11eb-9919-581b98c5e009.mov

    opened by subdan 0
Releases(0.7.1)
Owner
Ilya Lobanov
Ilya Lobanov
SwiftUI-Drawer - A bottom-up drawer in swiftUI

SwiftUI-Drawer A bottom-up drawer view. Contents Installation Examples Installat

Bruno Wide 9 Dec 29, 2022
The Napp Drawer module extends the Appcelerator Titanium Mobile framework.

Titanium Napp Drawer Module Description The Napp Drawer module extends the Appcelerator Titanium Mobile framework. The module is licensed under the MI

null 12 Sep 15, 2022
Super awesome Swift minion for Core Data (iOS, macOS, tvOS)

⚠️ Since this repository is going to be archived soon, I suggest migrating to NSPersistentContainer instead (available since iOS 10). For other conven

Marko Tadić 306 Sep 23, 2022
UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

UIPheonix is a super easy, flexible, dynamic and highly scalable UI framework + concept for building reusable component/control-driven apps for macOS, iOS and tvOS

Mohsan Khan 29 Sep 9, 2022
A super lightweight popView.

SNAugusPopView Features High performance: The library's dependencies all use system libraries and files , only a instance global. Automatic layout: Th

Augus 11 Sep 1, 2022
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.

BadgeHub A way to quickly add a notification badge icon to any view. Demo/Example For demo: $ pod try BadgeHub To run the example project, clone the r

Jogendra 772 Dec 28, 2022
Confetti View lets you create a magnificent confetti view in your app

ConfettiView Confetti View lets you create a magnificent confetti view in your app. This was inspired by House Party app's login screen. Written in Sw

Or Ron 234 Nov 22, 2022
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022
Play BreakOut while loading - A playable pull to refresh view using SpriteKit

BreakOutToRefresh Play BreakOut while loading - A playable pull to refresh view using SpriteKit BreakOutToRefresh uses SpriteKit to add a playable min

Dominik Hauser 2.5k Jan 5, 2023
A simple, customizable view for efficiently collecting country information in iOS apps.

CountryPickerView CountryPickerView is a simple, customizable view for selecting countries in iOS apps. You can clone/download the repository and run

Kizito Nwose 459 Dec 27, 2022
Elissa displays a notification on top of a UITabBarItem or any UIView anchor view to reveal additional information.

Elissa Attach a local notification to any UIView to reveal additional user guidance. Usage Example Per default, Elissa will try to align to the center

null 169 Aug 14, 2022
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Aufree 465 Nov 28, 2022
A child view controller framework that makes setting up your parent controllers as easy as pie.

Description Family is a child view controller framework that makes setting up your parent controllers as easy as pie. With a simple yet powerful publi

Christoffer Winterkvist 246 Dec 28, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 467 Dec 5, 2022
A container view that responds to scrolling of UIScrollView

FlexibleHeader A container view that responds to scrolling of UIScrollView. normal threshold FlexibleHeaderExecutantType Getting Started Progressive I

DongHee Kang 69 May 2, 2022
A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed flag

HidesNavigationBarWhenPushed A library, which adds the ability to hide navigation bar when view controller is pushed via hidesNavigationBarWhenPushed

Danil Gontovnik 55 Oct 19, 2022
Swift based simple information view with pointed arrow.

InfoView View to show small text information blocks with arrow pointed to another view.In most cases it will be a button that was pressed. Example To

Anatoliy Voropay 60 Feb 4, 2022
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

Jogendra 1.4k Jan 4, 2023
An iOS picker view to serve all your "picking" needs

Mandoline The PickerView is a UICollectionView that provides a smooth "picking" interface. In order to get the most out of it, a consuming view contro

Blue Apron 883 Nov 28, 2022