Learn Courses My Dashboard

Feeling Stressed out

I am feeling so stressed right now. On my first file that I had, I made a mistake and messed the whole file up so I made a new one and did it right but it seems like there are problems is this too! Please no one say I told you so

I don’t know why is this happening all the sudden when everything was going fine, can someone please help me.

What are the errors?

Can you please provide the errors and your code?

Paste your code in as text, rather than providing a screenshot.

To format the code nicely, place 3 back-ticks ``` on the line above your code and 3 back-ticks ``` on the line below your code. The 3 back-ticks must be the ONLY characters on the line. The back-tick character is located on the same keyboard key as the tilde character ~ (which is located below the Esc key). You can also highlight an entire code block and click the </> button on the toolbar to wrap the block for you.

This also makes it easier for anyone assisting as they can copy the code and carry out some testing.

Since it won’t show the errors on the code, I’ll send a screenshot as well. All I did was make a new file and create an onboarding screen and it came with lots of errors

import SwiftUI

enum OnboardingStep: Int {

    case welcome = 0
    case AboutUs = 1
    case Event = 2
    case Message = 3
    case End = 4

Onboarding_ContainerView: View {
    @State var CurrentStep: OnboardingStep = .welcome
    var body: some View {
        switch currentStep {
        case welcome:
        case AboutUs:
        case Event:
        case Message:
        case End:

struct Onboarding_ContainerView_Previews: PreviewProvider {
    static var previews: some View {

I think if you remove the closing brace on line 49 and add a closing brace to line 17 that should help fix it

Oh you also need to add the word struct prior to Onborading_containerView on line 18

That actually more errors.

You need a space between struct and Onboarding on line 18

Also on line 20 - current step has an upper case C whereas on line 25 it has lower case. You need to fix one of those to make them consistently spelt.

Thank you! Everything is back normal now! Now I just need to get these last couple of things done, I’ll look at the chat app tutorial that chris made again to see if I can do it

I’ve been trying and trying for a while and haven’t gotten barely anywhere