I am working on my first segue, and I am a bit confused. I have Made an initial screen with some buttons. Then I made a second screen. Then I clicked on the first screen, went to editor -> embed_in -> NavigationController and that worked.
But the screen I am trying to connect my button to isn’t showing up on the storyboard so I am not sure how to connect to it.
I am adding the screenshot of my storyboard.
You see how to storyboard has the Screen with 4 buttons connected to a NavigationController. But how do I get the other controller that I want to be connected to to show up on the same screen and connect to it?
This is the LearningCenter.h file
#import <UIKit/UIKit.h>
@interface LearningCenter : UIViewController
@end
Thanks!
Open your object library in Xcode while in the storyboard and search for a view controller and drag it onto the canvas:
then select the new view controller and go to the identity inspector and replace
UIViewControllerwith the name of your custom class.Now you have "glued" the storyboard view controller with your view controller code in your project.
To answer your second question with the segue: Hold ctrl and click and hold on your button. Then (while still holding ctrl + left mouse!) drag from the button to the new view controllers view. There should now be a segue