Learn Courses My Dashboard

Preview not working

I’m on the Lesson 4 Challenge of the 14-day challenge. I was editing the code and I don’t know what happened but my preview disappeared and now I get a white window with the message “File is not under source control”. Yes, I’ve tried Googling a solution, and no luck. I removed that project as a reference and re-added it (only suggestion found through Google) and that did not work.
How can I get my project to show in the preview window again? It’s worked up until today. Thanks.

Sometimes the Preview will disappear depending on what file type you are editing.

To get it back, click on the icon over on the upper right of your screen on the second row down that looks like a bunch of lines.
Screen Shot 2021-03-08 at 6.43.56 pm

When the drop down menu shows, select Canvas.

Screen Shot 2021-03-08 at 6.45.00 pm

This drop down menu does not appear in my version of Xcode. I was only able to download the latest version (12.4). I believe your snapshot is of an earlier version.
Are you able to provide this guidance for Xcode version 12.4? Here is a screenshot:

What is TightVNC Viewer???

Are you using Mac Stadium by any chance???

The screenshots I provided was from Xcode 12.4
It appears that you have Xcode set in Code Review mode so from the Xcode menu select View > Hide Code Review.

If the Canvas (preview) is still not visible then tap on that icon I described previously.

If you still cannot see the preview Canvas then follow the instructions I described in the previous post.

Thank you for this response. Unfortunately it did not work. As I’m lesson 4 I decided to scrap it and start again.

And yes, I’m using TightVNC and Mac Stadium. I just got an HP as a gift so not sure if I’m going to get a Mac yet.

You went to: View > Hide Code Review. and that doesn’t show you the icon to give you the canvas?