You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want my drawer heights (resting points) to be, [100, vStackHeight], so instead of giving it a constant number, i want the second resting height to be the height of the VStack, but I couldn't achieve it even when wrapping the VStack with GeometryReader, since the GeometryReader takes the the size of its parent (the ZStack), any idea how to achieve this behaviour?
@StatevardrawerHeights:[CGFloat]=[100,200]varbody:someView{Drawer(heights: $drawerHeights){ZStack(alignment:.top){RoundedRectangle(cornerRadius:24).foregroundColor(.white100).shadow(radius:10)VStack(spacing:0){Spacer().frame(height:40).background(Color.yellow)Text("How it works").textStyle(.headlinePrimaryCenter)Spacer().frame(height:40)Text("How it works").textStyle(.headlinePrimaryCenter)Text("How it works").textStyle(.headlinePrimaryCenter)Text("How it works").textStyle(.headlinePrimaryCenter)Text("How it works").textStyle(.headlinePrimaryCenter)Text("How it works3").textStyle(.headlinePrimaryCenter)Text("How it works4").textStyle(.headlinePrimaryCenter)}}}.edgesIgnoringSafeArea(.vertical)}
Basically I want the drawer second height (rest) to be dynamic and computed based on its children's height.
The text was updated successfully, but these errors were encountered:
I want my drawer heights (resting points) to be, [100, vStackHeight], so instead of giving it a constant number, i want the second resting height to be the height of the
VStack
, but I couldn't achieve it even when wrapping theVStack
withGeometryReader
, since theGeometryReader
takes the the size of its parent (theZStack
), any idea how to achieve this behaviour?Basically I want the drawer second height (rest) to be dynamic and computed based on its children's height.
The text was updated successfully, but these errors were encountered: