GithubHelp home page GithubHelp logo

carabina / side-navigation-swift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digipolitan/side-navigation-controller

0.0 2.0 0.0 5.15 MB

License: BSD 3-Clause "New" or "Revised" License

Swift 98.41% Objective-C 1.59%

side-navigation-swift's Introduction

DGSideNavigation

Build Status CocoaPods Compatible Carthage Compatible Platform Twitter

Side menu controller written in swift.

Demo iOS

Demo iOS

Demo tvOS

Demo tvOS

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Works with iOS 8+, tested on Xcode 8.2

Installing

To install the DGSideNavigation using cocoapods

  • Add an entry in your Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

target 'YourTarget' do
  frameworks
   use_frameworks!

  # Pods for YourTarget
  pod 'DGSideNavigation'
end
  • Then install the dependency with the pod install command.

Usage

How to register the side navigation

let sideNavigationController = SideNavigationController(mainViewController: UINavigationController(rootViewController: ViewController()))
sideNavigationController.rightSide(viewController: RightViewController())
window.rootViewController = sideNavigationController
self.window = window

Configuration

You can customize the side by passing options:

let options = SideNavigationController.Options(widthPercent: 0.5,
                                                      scale: 0.9,
                                                   position: .front)
sideNavigationController.rightSide(viewController: RightViewController(),
                                          options: options)

Here the list of all available options :

Property type Description Default
widthPercent CGFloat Size of the side view controller [0-1] 0.33
animationDuration TimeInterval How long the animation will last 0.3
overlayColor UIColor The overlay color white
overlayOpacity CGFloat Opacity of the overlay [0-1] 0.5
shadowColor UIColor Shadow color around the main or the side view controller white
shadowOpacity CGFloat Opacity of the shadow [0-1] 0.8
alwaysInteractionEnabled Bool Sets to true allows always user interaction on the main view controller false
panningEnabled Bool Allows panning to display and hide sides true
scale CGFloat Transform the scale of main view controller during the animation [0-2] 1
position SideNavigationController.Position The position of the side, such as below or above the main view controller back

Built With

Fastlane Fastlane is a tool for iOS, Mac, and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.

Contributing

See CONTRIBUTING.md for more details!

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

License

DGSideNavigation is licensed under the BSD 3-Clause license.

side-navigation-swift's People

Contributors

bbriatte avatar

Watchers

James Cloos avatar Carabineiro 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.