i have a TabBarController with two ViewController. One of them has a TableView. I want to set in the NavigationBar of ViewController with have the TableView a BarButtonItem (Add), so that the BarButtonItem is only show when the TableView is in front. But it doesn't work. I never see the BarButtonItem. So i put it on then TabBarController an i see it, but in both ViewController. That's not that what i want. An i can not call the segue, from the ViewController (TableView) to the DetailViewController, because my TabBarController not know it.
What is the right solution to do this? How can i put a BarButtonItem on then NavigationBar on a ViewController that ist Client of a TabBarController?
Thanks PS: i coding in swift ;-)
I post a Picture of my actual Storyboard, so you can understood me better.
When i place my add-button at position one i can't call the seque for a new Item in the data of the tableview.
When i place my add-button at position two i can call the segue, but i never see the button to click it.
my tabbarcontroller is showing when i clicked on detail for a cell on the tableview at the left on the picture.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.