Hello!
I wonder what is wrong with my code:
when I add a new line of text after the text "purpose", it says EXTRA ARGUMENT IN CALL.
i can't seem to figure out why.
I also wanted to format the paragraphs as "justified"
this is the snippet of the code: also, I am just starting to learn to code (I've started this just less than a week ago, your input would greatly be appreciated)
Thank you!
struct TableViewCell1Content: View { var body: some View { ScrollView { VStack(alignment: .center, spacing: 20) { Image("natural") .resizable() .cornerRadius(25) .aspectRatio(contentMode: .fit) .frame(maxWidth: 500) .padding(.bottom, 10)
Text("Natural Slope")
.font(.largeTitle)
.underline()
Text("Paragraph 1 over here . . . . . long 300-words at least")
.font(.body)
.multilineTextAlignment(.leading)
.lineSpacing(5)
.padding(.horizontal, 40)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.bottom, 30)
Image("artificial")
.resizable()
.cornerRadius(25)
.aspectRatio(contentMode: .fit)
.frame(maxWidth: 500)
.padding(.bottom, 10)
Text("Artificial Slope")
.font(.largeTitle)
.underline()
Text("another paragraph in this area containing 300 words")
.font(.body)
.multilineTextAlignment(.leading)
.lineSpacing(5)
.padding(.horizontal, 40)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.bottom, 30)
Image("reinforced")
.resizable()
.cornerRadius(25)
.aspectRatio(contentMode: .fit)
.frame(maxWidth: 500)
.padding(.bottom, 10)
Text("Reinforced Slope and Gabions")
.font(.largeTitle)
.underline()
Text("another paragraph words words words words words")
.font(.system(size:20))
.multilineTextAlignment(.leading)
.lineSpacing(5)
.padding(.horizontal, 50)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.bottom, 50)
//this part should show the purpose and scope
Text("Purpose")
.font(.largeTitle)
.underline()
Text("this should be a single paragraph explaining the purpose of this app")
}
.frame(maxWidth: .infinity)
.padding()
.alignmentGuide(HorizontalAlignment.center) { _ in
UIScreen.main.bounds.size.width / 2 / 2 // Align VStack at the center horizontally
}
}
.background(Color.brown.opacity(0.3))
}
}