I have this situation :
in my app I have a page view controller within view controllers and navigation controller. I want add right item in navigation bar when appear a particular view controller in page view controller and for this reason I did this in the view controller where I want to add right button:
override func viewDidAppear(animated: Bool) {
let camera:UIBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Camera, target: self, action: Selector("test"))
self.navigationItem.rightBarButtonItem = camera
}
but it doesn't work , I don't see the right button.
What do I wrong?
EDIT ONE:
this is my situation in storyboard:
