CopyPastor

Detecting plagiarism made easy.

Score: 0.8198811411857605; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2023-03-24
by Md.Mominul Islam

Original Post

Original - Posted on 2019-06-07
by ielyamani



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You can use the following code within If condition.
VStack(spacing: 0) { VStack { Text("Header") } .frame(maxHeight: 30.0) Text("Detail") .frame(maxHeight: .infinity) } .frame(maxWidth: .infinity) .background(Color.white) .cornerRadius(10.0) .padding(.top, 20) .transition(.move(edge: .bottom))



[![enter image description here][1]][1]

[1]: https://i.stack.imgur.com/KxLKO.png
One more alternative is to place one of the subviews inside of an `HStack` and place a `Spacer()` after it:
struct ContentView : View { var body: some View { VStack(alignment: .leading) { HStack { Text("Title") .font(.title) .background(Color.yellow) Spacer() } Text("Content") .lineLimit(nil) .font(.body) .background(Color.blue) Spacer() } .background(Color.red) } }
resulting in :
[![HStack inside a VStack][1]][1]

[1]: https://i.stack.imgur.com/T4QJb.png

        
Present in both answers; Present only in the new answer; Present only in the old answer;