All Projects → kawoou → Kwdrawercontroller

kawoou / Kwdrawercontroller

Licence: mit
Drawer view controller that easy to use!

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Kwdrawercontroller

drawer
A touch-enabled drawer component for the modern web.
Stars: ✭ 26 (-83.12%)
Mutual labels:  drawer, menu
Officialfoldingtabbar.android
Stars: ✭ 434 (+181.82%)
Mutual labels:  transition, menu
Guillotinemenu Android
Neat library, that provides a simple way to implement guillotine-styled animation
Stars: ✭ 2,743 (+1681.17%)
Mutual labels:  transition, menu
Mmenu Js
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
Stars: ✭ 2,535 (+1546.1%)
Mutual labels:  menu, drawer
Duo Navigation Drawer
A flexible, easy to use, unique drawer library for your Android project.
Stars: ✭ 986 (+540.26%)
Mutual labels:  menu, drawer
Beagle
A smart, reliable, and highly customizable debug menu library for Android apps that supports screen recording, network activity logging, and many other useful features.
Stars: ✭ 287 (+86.36%)
Mutual labels:  menu, drawer
Hamburger React
Animated hamburger menu icons for React (1.5 KB) 🍔
Stars: ✭ 391 (+153.9%)
Mutual labels:  transition, menu
Sidemenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
Stars: ✭ 5,267 (+3320.13%)
Mutual labels:  menu, storyboard
Flowingmenu
Interactive view transition to display menus with flowing and bouncing effects in Swift
Stars: ✭ 946 (+514.29%)
Mutual labels:  menu, drawer
Kydrawercontroller
Side Drawer Navigation Controller similar to Android
Stars: ✭ 632 (+310.39%)
Mutual labels:  drawer, storyboard
Kf drawer
Flutter drawer (dynamic ready side menu)
Stars: ✭ 144 (-6.49%)
Mutual labels:  menu, drawer
Drawer Behavior Flutter
Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
Stars: ✭ 110 (-28.57%)
Mutual labels:  menu, drawer
Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+1085.06%)
Mutual labels:  transition, menu
Brisk Menu
An efficient menu for the MATE Desktop
Stars: ✭ 142 (-7.79%)
Mutual labels:  menu
Instantiate
Type-safe and constructor injectable InterfaceBuilder protocols.
Stars: ✭ 149 (-3.25%)
Mutual labels:  storyboard
Liquidmenu
Menu creation Arduino library for LCDs, wraps LiquidCrystal.
Stars: ✭ 141 (-8.44%)
Mutual labels:  menu
Cpcollectionviewkit
Interesting UICollectionView layouts and transitions
Stars: ✭ 140 (-9.09%)
Mutual labels:  transition
Chinese Lunar Calendar For Mac
Chinese Lunar Calendar for Mac
Stars: ✭ 150 (-2.6%)
Mutual labels:  menu
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+7366.23%)
Mutual labels:  drawer
React Native Drawer Menu
A drawer component for React Native Application.
Stars: ✭ 140 (-9.09%)
Mutual labels:  drawer

KWDrawerController

Pod Version Pod Platform Pod License Swift

Drawer view controller that is easy to use!

Installation

CocoaPods (iOS 8+ projects)

KWDrawerController is available on CocoaPods. Add the following to your Podfile:

# Swift 3
pod 'KWDrawerController', '~> 3.7'

# Swift 4~
pod 'KWDrawerController', '~> 4.2'
pod 'KWDrawerController/RxSwift'        # with RxSwift extension

Manually

Simply drag and drop the DrawerController folder into your existing project.

Usage

Code

import UIKit

import KWDrawerController

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        let mainViewController   = MainViewController()
        let leftViewController   = LeftViewController()
        let rightViewController  = RightViewController()
        
        let drawerController     = DrawerController()

        drawerController.setViewController(mainViewController, .none)
        drawerController.setViewController(leftViewController, .left)
        drawerController.setViewController(rightViewController, .right)

        /// Customizing

        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.rootViewController = drawerController
        window?.makeKeyAndVisible()

        return true
    }
}

Storyboard

Storyboard

  1. Set DrawerController as the Custom Class of the Initial ViewController.

  2. Connect the DrawerEmbedLeftControllerSegue and/or the DrawerEmbedRightControllerSegue from DrawerController to your left/right controllers.

  3. Connect the DrawerEmbedMainControllerSegue from DrawerController to your main controller.

  4. Set the segue identifiers of both the inspector of DrawerController and the segues themselves.

Open / Close

/// Open
self.drawerController?.openSide(.left)
self.drawerController?.openSide(.right)

/// Close
self.drawerController?.closeSide()

Delegate

optional func drawerDidAnimation(
    drawerController: DrawerController,
    side: DrawerSide,
    percentage: Float
)

optional func drawerDidBeganAnimation(
    drawerController: DrawerController,
    side: DrawerSide
)

optional func drawerWillFinishAnimation(
    drawerController: DrawerController,
    side: DrawerSide
)

optional func drawerWillCancelAnimation(
    drawerController: DrawerController,
    side: DrawerSide
)

optional func drawerDidFinishAnimation(
    drawerController: DrawerController,
    side: DrawerSide
)

optional func drawerDidCancelAnimation(
    drawerController: DrawerController,
    side: DrawerSide
)

Customizing

Transition

DrawerTransition is a module that determines the rendering direction to move the Drawer. It is implemented by inheriting DrawerTransition.

  • DrawerSlideTransition

DrawerSlideTransition

  • DrawerScaleTransition
    • Use is not recommended.
  • DrawerParallaxTransition

DrawerParallaxTransition

  • DrawerFloatTransition
    • When using the Transition, Overflow Transition should also use DrawerFloatTransition.

DrawerFloatTransition

  • DrawerFoldTransition

DrawerFoldTransition

  • DrawerSwingTransition

DrawerSwingTransition

  • DrawerZoomTransition

DrawerZoomTransition

Overflow Transition

Overflow Transition be used when Transition beyond the open range of the drawer.

  • DrawerSlideTransition
  • DrawerScaleTransition
    • This is natural when used with DrawerSlideTransition, DrwaerParallaxTransition, DrawerFoldTransition, and DrawerSwingTransition.

DrawerScaleTransition

  • DrawerParallaxTransition
  • DrawerFloatTransition
    • When using the Overflow Transition, Transition should also use DrawerFloatTransition.
  • DrawerFoldTransition
    • Use is not recommended.
  • DrawerSwingTransition
    • Use is not recommended.
  • DrawerZoomTransition

Animator

Animator is a module that controls the speed of moving a drawer. It is implemented by inheriting DrawerAnimator or DrawerTickAnimator.

  • DrawerLinearAnimator
  • DrawerCurveEaseAnimator
  • DrawerSpringAnimator
  • DrawerCubicEaseAnimator
  • DrawerQuadEaseAnimator
  • DrawerQuartEaseAnimator
  • DrawerQuintEaseAnimator
  • DrawerCircEaseAnimator
  • DrawerExpoEaseAnimator
  • DrawerSineEaseAnimator
  • DrawerElasticEaseAnimator
  • DrawerBackEaseAnimator
  • DrawerBounceEaseAnimator

Options

public var isTapToClose: Bool
public var isGesture: Bool
public var isAnimation: Bool
public var isOverflowAnimation: Bool
public var isShadow: Bool
public var isFadeScreen: Bool
public var isBlur: Bool
public var isEnable: Bool

Changelog

  • 1.0 First Release.
  • 1.1 Bug Fix, Add animations.
  • 2.0 Refactoring.
  • 2.1 Bug Fix, Update animation.
  • 2.2 Fix animation, and some bugs.
  • 3.0 Written in Swift 3.0
  • 3.1 Fix Access Control issues on DrawerController.
  • 3.2 Fix Access Control issues on Transition.
  • 3.3 Fix Access Control issues on initializer.
  • 3.4 Remove debug log.
  • 3.5 Fixed bug where touch ignores is not applied for "Absolute Controller".
  • 3.6 Fixed an occurs issue while the drawer was open and layout changing.
  • 3.6.1 Fixed layout issue when rotate device.
  • 3.7 Fixed not updating issues on properties.
  • 4.0 Support Swift 4.
  • 4.1 Implement new flag that enables direction auto-switching.
  • 4.1.1 Support RxSwift(If you want).
  • 4.1.2
    • Fix issues on auto layout of child view controllers.
    • Replace naming.
    • Implement getViewController method.
    • Reduce cloning size.
  • 4.1.3
    • Fix crashed on load. (#12)
  • 4.1.4
    • Add state methods to delegate. (#16)
    • Fix access control issues. (#18)
    • Fixed DrawerFloatTransition bug. (#20)
    • DrawerController incorrectly manages lifecycles of child controllers. (#21 #22)
  • 4.1.5
  • 4.1.6
    • Fix transition bugs.
    • Fix gesture not working bugs.
    • Fix right drawer placement on iPads (#28 @rivera-ernesto)
  • 4.2
    • Support swift 4.2. (#31)

⚠️ Requirements

  • iOS 8.0+
  • Swift 3.0+

🔑 License

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

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