Latest 0.1.0
Homepage https://github.com/WataruMaeda/multiSlideMenu
License MIT
Platforms ios 8.0
Authors

Multi Slide Menu

CI Status
Version
License
Platform

Features

  • [x] Top, Left, Bottom and Right side positioning
  • [x] Easy to use, fully customisable, added slide menus without needing to write tons of code
  • [x] Enable to toggle slide menu with a button action.
  • [x] Keeps track of x, y point while dragging slide menu.
  • [x] Supports continuous swiping between side menus on 4 sides in a single gesture.

Demos

multiSlideMenu multiSlideMenu multiSlideMenu

Installation

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

pod 'multiSlideMenu’, ‘~> 0.1.0’

*Add the MultiSlideMenuViewController.swift class to your project manually(drag & drap the class into your project).

Usage

  1. Inherit MultiSlideMenuViewController in your UIViewController class
class ViewController: MultiSlideMenuViewController {
  1. Initialize SlideMenuView with position and bounds, That’s all!
// Sets up left slide menu
let sideMenu = SlideMenuView(position: .Left, bounds: view.frame)
sideMenu.backgroundColor = .yellow
super.setupSlideMenus(views: [sideMenu])

It’s specifing the slide menu is Left position, the view size is view.frame and background color is yellow.

multiSlideMenu

Customize View

It’s fully customisable!

  1. Create subview of SlideMenuView class
  2. You can add code in the override func draw(_ rect: CGRect) for your custom UI
import UIKit

class CustomSlideMenu: SlideMenuView {
    override func draw(_ rect: CGRect) {
        super.draw(rect)
        // your code here for the custom UI...
    }
}

See the code or sample gif for more info.

Toggle by button action

You can call show() or hide() for toggle the views.
For the hide() function, please check here
or the show(), you can check from here
You can see the sample gif.

Tacking position in SlideMenu

Tracking the current position is also important if you like to implement specific action in the specific timing.
There are some override functions to recognize the events.

  • func willShow(point: CGPoint)
  • func didShow(point: CGPoint)
  • func willDisappear(point: CGPoint)
  • func didDisappear(point: CGPoint)
  • func startDragging(point: CGPoint)
  • func continueDragging(point: CGPoint)
  • func endDragging(point: CGPoint)

Your can override there functions that keeps track of x, y position while dragging
See the code or sample gif for more info.

Tacking position in ViewController

Your can override the functions func getPresentingSlideWithPoint(slideMenu: point: )
See the code or sample gif for more info.

Requirements

iOS 8+
Swift 3.0+
Xcode 8.0+

License

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

Latest podspec

{
    "name": "multiSlideMenu",
    "version": "0.1.0",
    "summary": "Slide menus toggled by pan gesture appearing from 4 directions, Top, Left. Bottom and Right.",
    "description": "The open source library was for the developers who mind creating the apps with side menus which are toggled by a gesture. You can customize each side menu by specifying position and size depends on the design. Each side menus are traceable in position. When the gesture state is changed, each of override functions is called so that you can detect which side menu was dragging and where it is.",
    "homepage": "https://github.com/WataruMaeda/multiSlideMenu",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "WataruMaeda": "[email protected]"
    },
    "source": {
        "git": "https://github.com/WataruMaeda/multiSlideMenu.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "multiSlideMenu/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This