Customize your status bar like iOS 9.
「◀︎Back to Safari」 and 「apple.com▶︎」
import StatusBarKit
override func viewDidLoad() {
super.viewDidLoad()
let parameter = StatusViewParameter()
parameter.leftItem = StatusViewItem(title: "◀︎Back to Safari") {
UIApplication.sharedApplication().openURL(NSURL(string: "http://yahoo.co.jp")!)
}
parameter.rightItem = StatusViewItem(title: "apple.com▶︎") {
UIApplication.sharedApplication().openURL(NSURL(string: "http://apple.com")!)
}
parameter.backgroundColor = navigationController?.navigationBar.barTintColor
parameter.textColor = UIColor.whiteColor()
StatusViewManager.show(parameter)
}
To try StatusBarKit, open Terminal.app and enter the following command:
pod try StatusBarKit
StatusBarKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "StatusBarKit"
Just add the Pod/Classes folder to your project.
- iOS 8 and later
StatusBarKit is available under the MIT license. See the LICENSE file for more info.