To add items, we will need to add a new bar button to our navigation bar and set up a tap handler on the button so that we can respond to it by showing an input dialog to the user to enter the name of the item they want to add. To do so, we need to perform the following steps:
- Open up our Main.storyboard, search for Bar Button Item from the Object library, and drag it to the right-hand side of the navigation bar:
- Select the Bar Button Item and change the System Item to Add:
- Click the Assistant Editor to open the ...