From the course: iPadOS 13 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.

Solution: Add an image

Solution: Add an image - iOS Tutorial

From the course: iPadOS 13 Development Essential Training

Start my 1-month free trial

Solution: Add an image

(bouncy music) - [Instructor] So here is my solution to the challenge and of course you will likely have come up with a different solution with different images and of course a different layout for the images. So here, in my item struct, I'm going to create a string called image. And then in my array of items I'm going to add images. I'm going to use strings that I got from Apple's stock images. So you'll use gamecontroller and then I'm going to select this and just copy and paste it a few times. And then I'll go to helm, scope, headphones, and tornado. And then what I want to do is actually use these items. So inside of my navigation link I'm going to create an image, and I'm going to do that with a system name, and that's going to come from item.image. I'll wrap these in an HStack, and them I'm going to apply some padding to the image. So just the default padding, like that. And we can preview it at this point. So…

Contents