All Projects → MarioIannotta → Mipivotpagecontroller

MarioIannotta / Mipivotpagecontroller

Licence: mit
MIPivotPageController allows switching view controllers with an horizontal swipe

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Mipivotpagecontroller

Rxlifecycle
🐹 Easy life cycle observation
Stars: ✭ 46 (-51.58%)
Mutual labels:  viewcontroller
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-28.42%)
Mutual labels:  viewcontroller
React Swipeable List
Swipeable list component for React.
Stars: ✭ 86 (-9.47%)
Mutual labels:  swipe
Rxgesture
RxSwift reactive wrapper for view gestures
Stars: ✭ 1,069 (+1025.26%)
Mutual labels:  swipe
Flutter swipe action cell
A flutter UI package provides ListView leading and trailing swipe action menu.
Stars: ✭ 65 (-31.58%)
Mutual labels:  swipe
Dtoverlaycontroller
A customizable and easy-to-use overlay view controller container.
Stars: ✭ 82 (-13.68%)
Mutual labels:  viewcontroller
Nativescript Image Swipe
A NativeScript widget to easily 👆 and 🔍 through a list of images
Stars: ✭ 35 (-63.16%)
Mutual labels:  swipe
Godot Swipe Detector
Detect gestures and swipes in your game
Stars: ✭ 90 (-5.26%)
Mutual labels:  swipe
Swipe Listener
Zero-dependency, minimal swipe-gesture listener for the web.
Stars: ✭ 68 (-28.42%)
Mutual labels:  swipe
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (-10.53%)
Mutual labels:  swipe
React Soft Slider
Simple, fast and impartial slider
Stars: ✭ 54 (-43.16%)
Mutual labels:  swipe
Pullupcontroller
Pull up controller with multiple sticky points like in iOS Maps
Stars: ✭ 1,130 (+1089.47%)
Mutual labels:  swipe
Gesturerecognizerclosures
Closure support for handling gesture recognizers in Swift.
Stars: ✭ 84 (-11.58%)
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 (-50.53%)
Mutual labels:  swipe
Ionic Tinder Ui
Just a Tinder UI on Ionic
Stars: ✭ 86 (-9.47%)
Mutual labels:  swipe
Jquery.touchslider
A jQuery plugin that makes it easy to create touch sliders.
Stars: ✭ 43 (-54.74%)
Mutual labels:  swipe
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-16.84%)
Mutual labels:  swipe
Konamicode
Installs the Konami code easter-egg into your Android app ;)
Stars: ✭ 90 (-5.26%)
Mutual labels:  swipe
Angular Swipe
Simple vertical and horizontal swipe gesture directive for angular js
Stars: ✭ 88 (-7.37%)
Mutual labels:  swipe
React Native Deck Swiper
tinder like react-native deck swiper
Stars: ✭ 1,261 (+1227.37%)
Mutual labels:  swipe

MIPivotPageController

MIPivotPageController allows switching view controllers with an horizontal swipe

Setup

  • Copy the "MIPivotPageController" folder to your project.
  • Create a new instance with just a line of code
  MIPivotPageController.get(rootPages: [viewControllerA, viewControllerB, viewControllerC]) 
  • If you want, you can customize the UI with a simple closure

  MIPivotPageController.get(rootPages: [viewControllerA, viewControllerB, viewControllerC])  {
  
    $0.menuView.backgroundColor = myBlueColor
    $0.menuView.layer.shadowColor = UIColor.black.cgColor
    $0.menuView.layer.shadowOpacity = 0.3
    $0.menuView.layer.shadowOffset = CGSize(width: 0, height: 2)
    
    $0.setMenuHeight(60)
  
    $0.setLightStatusBar(true)
  
  }

  • The root view controllers (in this case viewControllerA, viewControllerB and viewControllerC) must conform the MIPivotRootPage protocol which has only one non-optional method that provide the image for the menu.
  func imageForPivotPage() -> UIImage?

There're also two usefull method like

  func rootPivotPageDidShow()
  func rootPivotPageWillHide()

that are called when a page in showed and when it's about to hide.

  • The other view controllers must inherit from MIPivotPage (which inerit from UIViewController). If you want, you can override those two methods:
    func shouldShowPivotMenu() -> Bool { return true }
    func pivotPageShouldHandleNavigation() -> Bool { return true }

If the first one return false, the menu will not be visible on that view controller. If the second one return false, the swipe (to the other root pivot pages) will be disabled for that view controller.

For a better understanding of those methods see the navigationController example in the demo.

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