1. Let’s take a look at it. Everyone already knows the correct usage of the previous navigation controller.
1. Then, what else is there? Is the jump and return of the navigation controller also clear?
It is also clear why we can return directly.
This navigation controller stack is the core focus of our project.
Everyone can understand, is there any problem? If there is a problem, it is normal, because we have just started to come into contact with this thing, and you are not used to it. Just type two codes and you will find that this is what happened.
2. Then, there is another point. Let me tell you, in the above code, we have the basic use of the navigation controller.
What are they? Is it equivalent to using pure code?
Yes, it is used through pure code.
Create a controller, but when creating this controller, a xib is assigned to it.
Let me emphasize this to everyone again,
Then, the wrong jump method we talked about in the last lesson directly created a new controller, which was not in the navigation controller stack. It jumped directly to the newly created controller, causing the program to crash. This wrong method, I commented it out,
#warning error
Then, for the above correct methods, I will uncomment them,
Taking a controller out of the stack to jump is what we should do.
Then, change the greenVc below to vc.
greenVc, change to vc,
This #waring is wrong. It should be #warning. There is an n missing. Please change it.
Okay, what about these, about our navigation controller, through the use of code,
Is it very simple, jump, return, and then, as well as some of its details, some of the details of the return, do you also know it?
2. Next, let’s see how to use this navigation controller through the storyboard.
1. What about me, then, create a new project,
Create a new Xcode Project,
Click Next, Name, come up with one,
Name: - Use navigation controller through storyboard
Then, I look at the code number and click Next.
It’s time for the 07th code, right?
Return to the previous step, change Name: to 07-use the navigation controller through storyboard
Then, click Create,
2. Okay, use the navigation controller through the storyboard. Have we used other controllers through the storyboard before?
TableViewController, have you used it? Have you used it?
There’s nothing difficult about this, so let’s just get started.
Moreover, I want to tell you that now I want to use the Main.storyboard of the system.
No problem, right?
Once it starts, will it load the Main.storyboard file?
Then I click on the associated class here,
Is the associated ViewController type?
Then I'll delete it,