Swift Objective-C
Permalink
Failed to load latest commit information.
DGSideNavigation.xcodeproj clean code Mar 13, 2017
DGSideNavigation.xcworkspace init the sample & setup left & right side Feb 25, 2017
Samples refactoring events Mar 18, 2017
Screenshots add GitHub files & screenshots Mar 20, 2017
Sources
Tests init the sample & setup left & right side Feb 25, 2017
fastlane
.gitattributes
.gitignore init the sample & setup left & right side Feb 25, 2017
.swiftlint.yml
.travis.yml
Brewfile init the sample & setup left & right side Feb 25, 2017
CHANGELOG.md add GitHub files & screenshots Mar 20, 2017
CODE_OF_CONDUCT.md add GitHub files & screenshots Mar 20, 2017
CONTRIBUTING.md add GitHub files & screenshots Mar 20, 2017
DGSideNavigation.podspec
Gemfile init the sample & setup left & right side Feb 25, 2017
LICENSE add GitHub files & screenshots Mar 20, 2017
Package.swift init the sample & setup left & right side Feb 25, 2017
Podfile init the sample & setup left & right side Feb 25, 2017
Podfile.lock init the sample & setup left & right side Feb 25, 2017
README.md

README.md

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 contact@digipolitan.com.

License

DGSideNavigation is licensed under the BSD 3-Clause license.