Learn Courses My Dashboard

Image added to Assets but does not show in the Canvas


I have the image in the asset library but it doesn’t show up in the canvas. Can i have help

Hi @kwaku2flairy

I have moved your post to its own thread since your question is unrelated to the original question posted in the other thread.

What is the name of the image in the Assets Folder? The spelling of the image in the Assets folder may be sightly different.

:clown_face: well, I can see the French flag in the screenshot :clown_face:

(I would also assume that the image in the asset is written slightly differently, i.e. upper/lower case, french instead of france, etc)

1 Like

Hey guys today is my first day doing the 14 day training and im lost with the same issue ive tried renaming the files but still nothing shows up. Im a newbie so sorry for this other question lol so when u open xcode to start a new project i noticed that a new project starts with VSTACK but in chris’ training video he had to type it in to get vstack the hstack and z stack, when i erase the words vtstack it “fails to buld scheme” how can i opt out to stack something ? If theres such a thing sorry and thank you in advacne!

Welcome to the community!
No you don’t have to use a ZStack, but you can only have one thing in the ContentView then.

Are you using the exact name from the assets? Properly using spacing or uppercase / lowercase?

Can you show a screenshot?

When a new project was created with the previous version of Xcode the code in the ContentView consisted of only this:

struct ContentView: View {
    var body: some View {
        Text("Hello, world!")
            .padding()
    }
}

Xcode 14 now creates a new project with this:

struct ContentView: View {
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundColor(.accentColor)
            Text("Hello, world!")
        }
        .padding()
    }
}

Don’t be concerned that it is different to what is Chris Ching has described in the video.

Xcode is in a constant process of being enhanced and over time you will get used to changes like this.