I have implemented a Detail Disclosure Button on my table view cell to edit existing texts in the cells. But the problem is that when I click on the Detail Disclosure Button it shows the existing text field but without any 'Edit' and 'Cancel' bar button items on the top. I have given the segue identifier name as 'EditItem'. I also have another segue which is named 'AddItem' that works properly and shows 'Edit' and 'Cancel' bar button item. I have checked the code many times to find out the problem but didn't find any solution. I want to know how to fix this problem.
I'm using Xcode 6 beta 6 SDK.
Your problem is that you are not adding the item the same way as you are editing the item. Look at this:
Notice that for the
AddItemsegue you are getting the view controller like this:But for the
EditItemsegue you are getting it like this:In your storyboard, the
AddItemsegue is connected to a navigation controller, which is then connected to yourAddViewController, but theEditItemsegue goes directly to theAddViewController.Connecting
EditItemto the same navigation controllerAddItemis connected to should fix your problem.