in UITableView
controller not in UIViewController
.
here i'm using SAP Fiori component for design.
So far i tried ui form storybard
using navigation bar prompt:
here is the code so far i tried:
self.navigationController?.makeBlackNavigationbar()
self.navigationController?.navigationBar.makeBlackNavigationBar()
let items = ["Label A", "Label B"]
segmentedController = UISegmentedControl(items: items)
segmentedController.frame = (self.navigationController?.toolbar.bounds)!
self.navigationController?.toolbar.addSubview(segmentedController)
extension UINavigationController
{
func makeBlackNavigationbar (){
print("black navigation")
navigationController?.isNavigationBarHidden = false
}
}
extension UINavigationBar
{
func makeBlackNavigationBar ()
{
barTintColor = UIColor(red: 68/255, green: 94/255, blue: 117/255, alpha: 1)
let titleDict: NSDictionary = [NSAttributedStringKey.foregroundColor: UIColor.white]
titleTextAttributes = titleDict as [NSObject : AnyObject] as! [NSAttributedStringKey : Any]
}
}
Any help much appreciated pls..