in the Checklist tutorial page 169 exercise, I set the storyboard id of List detail view,intead of the navigation controller view,here is my code:
let controller = storyboard!.instantiateViewController(withIdentifier: "ListDetailViewController") as! ListDetailViewController controller.delegate = self let checklist = lists[indexPath.row] controller.checklistToEdit = checklist present(controller, animated: true, completion: nil)
and this code works, but I don’t understand why the tutorials use the navigation controller’s storyboard id.
help me. pls
your code works, but if you have storyboard designed same way like in the book, you can’t see Cancel and Done button.
But nobody said you must use navigation controller, it’s just way you can do it. You can make Cancel and Done buttons as UIButton instead of UIBarButton. Then everything can work with your code.
But if you want use navigation controller and bar buttons, you must find for navigation controller in storyboard first. Then you can access to its controller like is it in the book example.
Hope this helped.
You have actually posted and asked your question and issue in the wrong thread, forum and category after all for sure and for good indeed: this is an iOS Apprentice related query and you are in the Swift Apprentice forum. Please post your question in the appropriate, corresponding, associated and correct thread over here instead: https://forums.raywenderlich.com/c/books/ios-apprentice in order to get a proper answer, reply and solution to it after all for sure and for good indeed. Thank you! :]