Code Monkey home page Code Monkey logo

cssimplesidemenu's Introduction

CSSimpleSideMenu

Version License Platform

Example

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

Screenshots

Requirements

  • Xcode 9.4.
  • Swift 4.1.
  • 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', '~> 1.0.3'

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

// 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

cssimplesidemenu's People

Contributors

yaddaa avatar

Stargazers

MohsinAli avatar

Watchers

MohsinAli avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.