I am trying to create a second view controller and I would like to have the same toolbar with buttons that I created and coded from the first view controller without creating and coding that toolbar again. How can I do that?
A better approach would be to create the toolbar in a parent view controller. You should use a navigation controller embedded in a container view for that.
This is the scene structure of this approach in Interface Builder:
View structure (click to enlarge):
Use an Embed Segue to display the navigation controller in the container view.
You can use delegates to pass actions (e.g. a bar button item was tapped).
Read more about delegates in Swift here.