All Projects → MarioIannotta → Pullupcontroller

MarioIannotta / Pullupcontroller

Licence: mit
Pull up controller with multiple sticky points like in iOS Maps

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Pullupcontroller

Sweetcurtain
A framework that provides CurtainController. CurtainController is a container view controller that implements a content-curtain interface. You can find a similar implementation in applications like Apple Maps, Find My, Stocks, etc. Someone calls it "Pull Up" or "Bottom Sheet".
Stars: ✭ 109 (-90.35%)
Mutual labels:  swipe, user-experience
Spionio
Lightweight focus group management platform that can capture and replay user interaction on your site and improve the UX in everything you build
Stars: ✭ 40 (-96.46%)
Mutual labels:  user-experience
Cariocamenu
The fastest zero-tap iOS menu.
Stars: ✭ 785 (-30.53%)
Mutual labels:  swipe
Swipeformore
Manage Cydia packages via swipe.
Stars: ✭ 11 (-99.03%)
Mutual labels:  swipe
Verticalcardswiper
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
Stars: ✭ 830 (-26.55%)
Mutual labels:  swipe
Fullpage.js
fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
Stars: ✭ 32,974 (+2818.05%)
Mutual labels:  swipe
Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+2512.3%)
Mutual labels:  swipe
Rxgesture
RxSwift reactive wrapper for view gestures
Stars: ✭ 1,069 (-5.4%)
Mutual labels:  swipe
Nativescript Image Swipe
A NativeScript widget to easily 👆 and 🔍 through a list of images
Stars: ✭ 35 (-96.9%)
Mutual labels:  swipe
Auto Layout
Auto Layout for Sketch
Stars: ✭ 863 (-23.63%)
Mutual labels:  user-experience
React Native Scrollable Tab View
Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
Stars: ✭ 6,784 (+500.35%)
Mutual labels:  swipe
Swipeabletabbarcontroller
UITabBarController with swipe interaction between its tabs.
Stars: ✭ 919 (-18.67%)
Mutual labels:  swipe
Llmlistview
super list view for uwp
Stars: ✭ 27 (-97.61%)
Mutual labels:  swipe
Splide
Splide is a lightweight, powerful and flexible slider and carousel, written in pure JavaScript without any dependencies.
Stars: ✭ 786 (-30.44%)
Mutual labels:  swipe
Jquery.touchslider
A jQuery plugin that makes it easy to create touch sliders.
Stars: ✭ 43 (-96.19%)
Mutual labels:  swipe
Liquidswipe
Android LiquidSwipe Library
Stars: ✭ 721 (-36.19%)
Mutual labels:  swipe
Swipe
Swipe is the most accurate touch slider. Support both React and Angular.
Stars: ✭ 850 (-24.78%)
Mutual labels:  swipe
React Native Overlay Section
Overlay section like iOS Notification Center
Stars: ✭ 14 (-98.76%)
Mutual labels:  swipe
React Soft Slider
Simple, fast and impartial slider
Stars: ✭ 54 (-95.22%)
Mutual labels:  swipe
Uwp App Launcher Mobile
[Open Source] It's like the iOS and Android Home Screens but for Windows 10 (Phones).
Stars: ✭ 47 (-95.84%)
Mutual labels:  swipe

PullUpController

Create your own pull up controller with multiple sticky points like in iOS Maps

Platform Swift 5 Cocoapods Compatible Maintainability

Features

  • Multiple sticky points
  • Landscape support
  • Scroll views friendly

Setup

  1. Add pod 'PullUpController' to your Podfile or copy PullUpController.swift into your project
  2. Make sure the view controller that will be your pull up controller inherits from PullUpController
  3. Add the controller as child of your main controller using addPullUpController(<#T##PullUpController#>, initialStickyPointOffset: <#T##CGFloat#>, animated: <#T##Bool#>)

Customization

You can customize the controller behavior by overriding the followings properties:

pullUpControllerPreferredSize: CGSize

The desired size of the pull up controller’s view, in screen units. The default value is width: UIScreen.main.bounds.width, height: 400.

pullUpControllerPreferredLandscapeFrame: CGRect

The desired size of the pull up controller’s view, in screen units when the device is in landscape mode. The default value is (x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20).

pullUpControllerMiddleStickyPoints: [CGFloat]

A list of y values, in screen units expressed in the pull up controller coordinate system. At the end of the gestures the pull up controller will scroll to the nearest point in the list.

For a complete list of all the sticky points you can use pullUpControllerAllStickyPoints

pullUpControllerBounceOffset: CGFloat

A CGFloat value that determines how much the pull up controller's view can bounce outside it's size. The default value is 0 and that means the the view cannot expand beyond its size.

It's possible to change the view controller's view position programmatically by using the method pullUpControllerMoveToVisiblePoint(_ visiblePoint: CGFloat, animated: Bool, completion: (() -> Void)?)

This method will move the pull up controller's view in order to show the provided visible point.

You may use on of pullUpControllerAllStickyPoints item to provide a valid visible point.

  • visiblePoint: the y value to make visible, in screen units expressed in the pull up controller coordinate system.
  • animated: a true value will move the view with an animation.
  • completion: the closure to execute after the animation is completed. This block has no return value and takes no parameters. You may specify nil for this parameter.

By overriding the following method it is possible to customize all the animations performed by the controller's view. pullUpControllerAnimate(action: Action, withDuration duration: TimeInterval, animations: @escaping () -> Void, completion: ((Bool) -> Void)?)

You can consider override this method and customize the animation using the method UIView.animate(withDuration:, delay:, usingSpringWithDamping:, initialSpringVelocity:, options:, animations:, completion:)

  • parameter: The action that is about to be performed (.add, .remove or .move)
  • duration: The total duration of the animations, measured in seconds. If you specify a negative value or 0, the changes are made without animating them. -animations: A block object containing the changes to commit to the views. completion: A block object to be executed when the animation sequence ends.

It is possible to observe the PullUpController's view state by overriding those methods: pullUpControllerWillMove(to point: CGFloat)

This method is called before the pull up controller's view move to a sticky point.

pullUpControllerDidMove(to point: CGFloat)

This method is called after the pull up controller's view move to a point.

pullUpControllerDidDrag(to point: CGFloat)

This method is called after the pull up controller's view is dragged to a point.

PullUpController is easy draggable even if your PullUpController's view contains a UIScrollView, just attach it to the controller itself with the following method: <#T##UIScrollView#>.attach(to: <#T##PullUpController#>)

Attach the scroll view to the provided pull up controller in order to move it with the scroll view content.

  • pullUpController: the pull up controller to move with the current scroll view content.

Demo

In this repository you can also find a demo.

Info

If you like this git you can follow me here or on twitter :) @MarioIannotta

Cheers from Italy!

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