I have a simple app with two views in the storyboard, with two segues connecting them together. in the viewDidLoad of each controller I programmatically create one button, and the action for that button is to switch to the other view. The main code for one of the view controllers is shown here The code for the second one is identical except for the view controller and button names.I have a simple app with two views in the story