Latest 1.1.3
Homepage https://github.com/yaddaa/CSSimpleSideMenu
License MIT
Platforms ios 10.0
Authors

Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Screenshots

CSSimpleSideMenuCSSimpleSideMenu

Requirements

  • [x] Xcode 9.4.
  • [x] Swift 4.1.
  • [x] iOS 10 or higher.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate SideMenu into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'CSSimpleSideMenu'

Then, run the following command:

$ pod install

Usage

First Step:

import CSSimpleSideMenu

Second Step:


//example
let firstViewController = UIViewController()
let secondViewController = UIViewController()

let controllers = [
    SideMenuControllerModel(with: firstViewController, name: "First"),
    SideMenuControllerModel(with: secondViewController, name: "Second")
]

// create customization model
let customization = SideMenuCustomizationModel()

//customize
customization.position = .left

//configure
SideMenu.configure(with: controllers, customization: customization)

Important:

You need to call (SideMenu.configure) func at start your app

SideMenu.configure(with: controllers, customization: customization)

Customization Model Properties


//----------------- Background side menu settings

// you can set just background colod
public var backgroundColor: UIColor = UIColor(red: 0.209, green: 0.251, blue: 0.311, alpha: 1)

// or background image
public var backgroundImage: UIImage? = nil

//----------------- Customize items

// background color for selected item
public var menuItemsSelectedColor: UIColor = UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 0.1)

public var menuItemsFont: UIFont = .boldSystemFont(ofSize: 17)
public var menuItemsTitleColor: UIColor = .white
public var menuItemsHeight: CGFloat = 64

//----------------- Top and bottom images

public var topImage: UIImage? = nil
public var bottomImage: UIImage? = nil

public var imagesContentMode: UIViewContentMode  = .scaleAspectFit

public var bottomImageHeight: CGFloat = 0

// top offset for menu items depends on this property
public var topImageHeight: CGFloat = UIScreen.main.bounds.height * 0.25

//----------------- Menu position
//set .left or .right side menu position
public var position: SideMenuEnums.Position = .left

Author

Chelak Stas, [email protected]

License

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

A simple side menu for small projects

Latest podspec

{
    "name": "CSSimpleSideMenu",
    "version": "1.1.3",
    "summary": "A simple iOS side menu for small projects.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/yaddaa/CSSimpleSideMenu",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Chelak Stas": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yaddaa/CSSimpleSideMenu.git",
        "tag": "1.1.3"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "4.1",
    "source_files": "CSSimpleSideMenu/**/*.{swift}",
    "resource_bundles": {
        "CSSimpleSideMenu": [
            "CSSimpleSideMenu/**/*.{storyboard,xib}"
        ]
    }
}

Pin It on Pinterest

Share This