SideNavigationController 2.0.1

SideNavigationController 2.0.1

Maintained by Benoit BRIATTE.



  • By
  • Digipolitan

SideNavigationController

Swift Version Build Status CocoaPods Compatible Carthage Compatible Platform Twitter

Side navigation 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 9+, tested on Xcode 8.2

Installing

To install the SideNavigationController using cocoapods

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

target 'YourTarget' do
  frameworks
   use_frameworks!

  # Pods for YourTarget
  pod 'SideNavigationController'
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

SideNavigationController is licensed under the BSD 3-Clause license.