From d77591c5d177866be227321643571d2ac38475ad Mon Sep 17 00:00:00 2001 From: Bhavesh Sarwar Date: Wed, 7 Mar 2018 00:26:49 +0530 Subject: [PATCH] - updated README --- README.md | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fbaae16..cdd06f4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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()