Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Changing background.png in iOS Crystall Ball project?

I'm working through the "Shaking Things Up" lesson and I got to the very end where you change the background image to a new version with the text "Shake to Predict" written across the bottom. Unfortunately, even though I've deleted and then added the new images as shown in the video, the image refuses to change in the simulator. I can click on the images in the navigator and they display the correct background, but it won't show up in the app. Am I missing something?

6 Answers

After some googling, this is apparently an issue with the iOS Simulator caching images. Anyone know of a way to manually clear the cache?

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

@Benjamin

You can do it two ways:

  1. Xcode cache: http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4

  2. iPhone Simulator With the simulator open from the menu select iOS Simulator -> Reset Content and Settings

Hi Mr @Amit, I tried the tips that you gave me, it didn't work. I'd restart my MBP and I put on Shut down mode. when I came back again, the background still not changes. How can I fixed it?

never mind I found new solution, I created new project, and I play around with the image and I copied previous app program, hence, everything become what'd we expected. :D

I had the exact same problem.

Following the stackoverflow link from Amit, I tried this and it worked:

In Xcode, hit Command + option + shift + k

A popup asks if you wan to clean the build. Click clean.

That worked for me anyways, hope it works for you!

Is everyone using the same images as Amit if so where do i get them from, im not sure how I can make this crystal ball app without any images, please help, i cant move forward without the images.

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Below every video is a Downloads section that contains a link to the Project Files.