From the course: iOS 14 Development Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sending data between views and screens

Sending data between views and screens

From the course: iOS 14 Development Essential Training

Start my 1-month free trial

Sending data between views and screens

- [Instructor] Now let's take a look at actually sending the data from our content view to the detail view. Now, we've actually done this before with our other application. If you remember with our slider app, we created properties inside of the other views, then we sent values as parameters from the content view. We're going to do the same thing here. I'm going to open up the detail view with the keyboard shortcut shift + command + O, which is for open quickly. Now I'm going to start to type the name of my file which is detail view. Once it's highlighted, I can press return to go to that file. In here, I'm going to create a new line above the body object, create a variable called data that is of the type table data. Now, you may be wondering why we don't want to just get a string to put inside of our text object. And the reason is, if we want to do more with the data later on, it's much easier to pass it in now than…

Contents