All Projects → kukushi → Sidemenu

kukushi / Sidemenu

Licence: mit
An interactive iOS side menu with rich features.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Sidemenu

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 (+1091.63%)
Mutual labels:  cocoapods, carthage, storyboard, sidemenu
Kydrawercontroller
Side Drawer Navigation Controller similar to Android
Stars: ✭ 632 (+42.99%)
Mutual labels:  cocoapods, carthage, storyboard
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (-1.36%)
Mutual labels:  cocoapods, carthage, storyboard
Interactivesidemenu
iOS Interactive Side Menu written in Swift.
Stars: ✭ 668 (+51.13%)
Mutual labels:  cocoapods, carthage, sidemenu
Switch
💊 An iOS switch control implemented in Swift with full Interface Builder support
Stars: ✭ 132 (-70.14%)
Mutual labels:  cocoapods, carthage, storyboard
Localize
Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings.
Stars: ✭ 253 (-42.76%)
Mutual labels:  cocoapods, carthage, storyboard
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (-51.13%)
Mutual labels:  cocoapods, carthage, sidemenu
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+619.91%)
Mutual labels:  cocoapods, carthage, storyboard
Vgplayer
📺 A simple iOS video player by Vein.
Stars: ✭ 383 (-13.35%)
Mutual labels:  cocoapods, carthage
Taggerkit
🏷 TaggerKit helps you to quickly implement tags in your UIKit apps, so you can go on and test your idea without having to worry about logic and custom collection layouts.
Stars: ✭ 390 (-11.76%)
Mutual labels:  cocoapods, carthage
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (-11.54%)
Mutual labels:  cocoapods, carthage
Swiftyxmlparser
Simple XML Parser implemented in Swift
Stars: ✭ 413 (-6.56%)
Mutual labels:  cocoapods, carthage
Restofire
Restofire is a protocol oriented networking client for Alamofire
Stars: ✭ 377 (-14.71%)
Mutual labels:  cocoapods, carthage
Foldingtabbar.ios
Folding Tab Bar and Tab Bar Controller
Stars: ✭ 3,677 (+731.9%)
Mutual labels:  cocoapods, carthage
Gradientcircularprogress
Customizable progress indicator library in Swift
Stars: ✭ 407 (-7.92%)
Mutual labels:  cocoapods, carthage
Simpleimageviewer
A snappy image viewer with zoom and interactive dismissal transition.
Stars: ✭ 408 (-7.69%)
Mutual labels:  cocoapods, carthage
Circularprogress
Circular progress indicator for your macOS app
Stars: ✭ 366 (-17.19%)
Mutual labels:  cocoapods, carthage
Urweatherview
Show the weather effects onto view written in Swift4.2
Stars: ✭ 439 (-0.68%)
Mutual labels:  cocoapods, carthage
Arslineprogress
iOS progress bar, replacement for the default activity indicator.
Stars: ✭ 434 (-1.81%)
Mutual labels:  cocoapods, carthage
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (-4.75%)
Mutual labels:  cocoapods, carthage

Version Swift5 Carthage compatible License Platform

Overview

SideMenu is an easy-to-use side menu container controller written in Swift 5.

Besides all the features a Side Menu should have, it supports:

  • Four kinds of status bar behaviors (iOS 12 and earlier)
  • Three different menu position
  • Both storyboard and programmatically
  • Caching the content view controller and lazy initialization
  • Rubber band effect while panning
  • Custom transition animation
  • RTL supports
  • API References

Preview

Menu Position / Status Menu Behavior

Above + None Below + Slide
SideBySide + Fade SideBySide + HideOnMenu

We call the left/right view controller as the menu view controller, the central view controller as content view controller.

Installation

For Swift 5, please use 2.0.0 or later version.

For Swift 4.0, please using 0.5.1 or earlier version. For Swift 4.2, please using 1.x

CocoaPods

To install SideMenu with CocoaPods, add the below line in your Podfile:

pod 'SideMenuSwift'
# Note it's NOT 'SideMenu'

Carthage

To install SideMenu with Carthage, add the below line in your Cartfile:

github "kukushi/SideMenu" "master"

Usages

Storyboard

To set up `SideMenu` in storyboard:
  1. Open the view controller's Identity inspector. Change its Class to SideMenuController and Module to SideMenuSwift.
  2. Set up the menu view controller and the initial content view controller in your Storyboard. Add a Custom segue from the SideMenuController to each of them.
    • Change the menu segue's identifier to SideMenu.Menu, Class to SideMenuSegue and Module to SideMenuSwift.
    • Change the content segue's identifier to SideMenu.Content, Class to SideMenuSegue and Module to SideMenuSwift.
  3. (Optional) If you want to use custom segue identifier:
    • Open the SideMenuController's Attribute inspector.
    • In the Side Menu Controller section, modify the Content SegueID/Menu SegueID to the desired value and change the corresponding segue's identifier.
  4. It's done. Check this screenshot a for clear view.

Programmatically

To start the app with `SideMenu` programmatically:
import UIKit
import SideMenuSwift
// If you are using Carthage, uses `import SideMenu`

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    @objc func applicationDidFinishLaunching(_ application: UIApplication) {
        let contentViewController = ...
        let menuViewController = ...

        window = UIWindow(frame: UIScreen.main.bounds)
        window?.rootViewController = SideMenuController(contentViewController: contentViewController, 
        menuViewController: menuViewController)
        
        window?.makeKeyAndVisible()
        return true
    }
}

Use the sideMenuController method which provided in UIViewController's extension to get the parent SideMenuController:

viewController.sideMenuController?.revealMenu()

Preferences

All the preferences of SideMenu can be found in SideMenuController.preferences. Its recommend to check out the Example to see how those options will take effect.

SideMenuController.preferences.basic.menuWidth = 240
SideMenuController.preferences.basic.statusBarBehavior = .hideOnMenu
SideMenuController.preferences.basic.position = .below
SideMenuController.preferences.basic.direction = .left
SideMenuController.preferences.basic.enablePanGesture = true
SideMenuController.preferences.basic.supportedOrientations = .portrait
SideMenuController.preferences.basic.shouldRespectLanguageDirection = true

// See a lot more options on `Preferences.swift`.

Caching the Content

One of the coolest features of SideMenu is caching.

// Cache the view controllers somewhere in your code
sideMenuController?.cache(viewController: secondViewController, with: "second")
sideMenuController?.cache(viewController: thirdViewController, with: "third")

// Switch to it when needed
sideMenuController?.setContentViewController(with: "second")

What about the content view controller initialized from the Storyboard? We can use the preferences to apply a default key for it!

SideMenuController.preferences.basic.defaultCacheKey = "default"

What if we can't want to load all the content view controllers so early? We can use lazy caching:

sideMenuController?.cache(viewControllerGenerator: { self.storyboard?.instantiateViewController(withIdentifier: "SecondViewController") }, with: "second")
sideMenuController?.cache(viewControllerGenerator: { self.storyboard?.instantiateViewController(withIdentifier: "ThirdViewController") }, with: "third")

Requirements

  • Xcode 10 or later
  • iOS 9.0 or later

License

SideMenu is available under the 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].