Auto Layout Tutorial Lesson 2

Hi! I am working on Lesson 2 about auto layout. I am having trouble with the images. None of the buttons or background images are showing. Not sure what I did wrong. I have all images in the assets folder as well. Thanks!

Hi Garrett,

Welcome to the Code Crew community.

Can you check the images in your Assets catalogue and ensure that all of them have “Target Membership” checked as per the attached image. Select all of them and you can collectively ensure that it is checked.

Hi Chris,
Thank you for your help. Glad to be here and learning with the community.

I did that and still nothing showing up. Not sure what is goin on.

Hi Garrett,

That’s a little strange. Have you tried removing all the images from the Asset catalogue and then adding them again?

Failing that, try closing your project, Quit Xcode, re-launch Xcode and then open your project again.

If that’s no good either, then try restarting your Mac.


Yeah still no luck. So I moved onto the bonus exercise and when I create an image view and select background image it’s just white. Even after i set the constraints and change content mode nothing happens.

That is really odd.

Do you want to zip the entire project and post it to DropBox and share a link here so I can take a look?

Sure let me try that.

Here you go

OK let me take a look and I’ll get back to you shortly.

Thank you so much Chris. Really appreciate it.

OK that runs perfectly here so that’s worrying. Here’s a screenshot:

I think we need to do some maintenance on your Mac to make sure that there are no permissions errors. That can sometimes occur when updates are applied for the Operating System.

Close all your applications.

Open Disk Utility and select your Macintosh HD and then tap on the First Aid icon. The process could take a while depending on your disk size and how full it is. Grab a beer or a cup of tea and relax while it performs that task.

1 Like

Okay So I was thinking the same thing as you. So I quit xcode and opened it from the app store with a recent update. It installed some components and now it works,haha. I will also do what you say above. My mac is getting a little old I guess. need to get a new one soon.

Oh well done. That’s what you want to see.

There maybe isn’t an permissions issue so I think it is safe to skip that idea for the moment.

1 Like

Okay sounds good. I’ll keep moving on then for now. Seems like it fixed the issue. Thank you very much for your help Chris, i really appreciate it alot.

No problem Garrett. Good luck with the rest of the tutorial. Yell if you need help. There are quite a few active members here like myself. Chris Ching (CodeWithChris) is pretty busy but he has a number of moderators who scan through the messages and help where they can. A few of us are in different time zones so someone will chime in.

1 Like

Thank you! That’s awesome that there is always someone to help out. I live in Poland so wasn’t sure if someone would reply for awhile. Anyway, thanks again Chris.

I’m in Perth, Western Australia so that’s UTC + 8 hours

1 Like

Wow, awesome. Only six hours difference from here not too bad. Well enjoy the rest of your evening Chris.

1 Like