A simple custom navigation bar, Create SLBarButtonItem just like create UIBarButtonItem style, convenient to extend the Navigationbar.
Click here to visit the Objective-C version..
To run the example project, clone the repo, and run pod install from the Example directory first.
###SLBarButtonItem Add a barBottunItem:
let leftItem : SLBarButtonItem = SLBarButtonItem(image: UIImage(named: "titlebar_user"), target: self, action: #selector(userClick(_:)))
self.naviBar.leftItem = leftItemAdd a few of barBottonItems:
let rightItem1 = SLBarButtonItem(title: "编辑", target: self, action: #selector(rightItemClick(_:)))
let rightItem2 = SLBarButtonItem(image: UIImage(named: "titlebar_scan"), target: self, action: #selector(rightItemClick(_:)))
self.naviBar.rightItems = [rightItem1, rightItem2]###SLBaseViewController The ViewController which is Inheritance from SLBaseViewController, can override method initNaviBar.You can set default SLNavigationBar title use the following method:
self.title = "SLNavigationBar Demo";SSLNavigationBar is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SSLNavigationBar"Smilelu, hmilyt@foxmail.com
SSLNavigationBar is available under the MIT license. See the LICENSE file for more info.
