Skip to content

Commit

Permalink
- updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavesh Sarwar committed Mar 6, 2018
1 parent 9c8091c commit d77591c
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ Navigation bar provides default back button and title


There are two types to use custom navigation bar
1. Global navigatio bar
1. Global navigation bar
Global navigation bar is configured from the appdelegate. it will work same throughout the app
you dont need to add navigation bar in every view controller. once it has been configured it will be steady throughout the app

To use this You have to follow steps
- Enable navigation bar from the AppDelegate

CustomNavigationBar.enableGlobalCustomNavigationBar(forWindow: self.window!, customHeight: 80)


#AppDelegate.swift

CustomNavigationBar.enableGlobalCustomNavigationBar(forWindow: self.window!, customHeight: 80)
#ViewController.swift
- Update contents of navigation bar in each viewcontroller so navigation bar will be steady but the contents can be reconfigured
there will not be any kind of redraw and animation in Navigation bar

Expand All @@ -31,4 +34,29 @@ There are two types to use custom navigation bar
isCustomBackButton: true,
rightBarButtonsCustomView: NSArray(),
backButton:customBackbutton)

2. Local Navigation bar
This navigation bar needs to be configured in each view controller. in this type of navigation bar will be tightly coupled to the viewController's view
so this can also have push effect or any transition effect which are given to the view controller. This will also have same type with custom back button or without custom back button

//WITHOUT CUSTOMISE BACK BUTTON (it will use default back button)

let navigationBar = CustomNavigationBar.addCustomNavigationBarOnView(viewToAdd: self.view,
navigationaBarTitle: "Title",
isCustomBackButton: false,
rightBarButtons: NSArray(),
customHeight: navigationBarHeight)
//User can provide custom back button with
//CUSTOM BACK BUTTON
//Initializing custom navigation bar
let navigationBar = CustomNavigationBar.addCustomNavigationBarOnView(viewToAdd: self.view,
navigationaBarTitle: "Title",
backButton: btnLeftMenu,
isCustomBackButton: true,
rightBarButtons: NSArray(),
customHeight: navigationBarHeight)
EXTRA FEATURES
- Navigation bar having custom shadow
navigationBar.dropShadow()

0 comments on commit d77591c

Please sign in to comment.