Currently my view only allows for the list to be scrollable by itself. Does anyone know how to make a whole view scrollable with a list placed below a VSTACK?
var body: some View {
VStack {
ZStack{
Circle()
.stroke(Color.black, lineWidth: 5)
.frame(width: 150, height: 150)
Text("Score")
.font(.system(size: 20))
.bold()
}.padding(.bottom, 30)
Text("Friends")
.bold()
.font(.system(size: 24))
List{
ForEach(allFriends) { item in
HStack{
ZStack{
Circle()
.fill(LinearGradient(gradient: Gradient(colors: [Color("LightBlue"), Color("LightPink"), Color("LightYellow")]), startPoint: .bottom, endPoint: .top))
.frame(width: 60, height: 60)
Text(item.emoji)
.font(.system(size: 40))
}.padding(.trailing, 40)
Text(item.name)
.font(.system(size: 20))
.bold()
}
}
}
}
}
}
struct ProfilePage_Previews: PreviewProvider {
static var previews: some View {
ProfilePage()
}
}