I am trying to add a custom view on right of UINavigationBar. What I tried is the following, but the view is not showing up! Pleas
You can do like this, try it:
var view = UIView(frame: CGRectMake(0, 0, 100, 44)) view.backgroundColor = UIColor.yellowColor() var barButtonItem = UIBarButtonItem(customView: view) self.navigationItem.rightBarButtonItem = barButtonItem