A Swift UI view that arranges its children in a vertical line.
Questions tagged [vstack]
193 questions
0
votes
2 answers
Swift UI VStack align up. Make textfield appear with keyboard when pressing in it
I am having issues placing my "twitter" image higher in my view while using SwiftUI. I want to get the twitter image higher up for all closer to my two blob images, as well as add the spacing between the twitter image and the "Sign into my account"…

bain
- 335
- 1
- 6
- 17
0
votes
1 answer
SwiftUI: VStack don't apply to white background color but every other color
I have following code. If I change .background(Color.green) to .background(Color.white) for the VStack the background will be the systemGray I used for the Listbackground.
Has it something to do with the .colorMultiply(Color(UIColor.systemGray4))…

HansDeBeer
- 197
- 2
- 10
0
votes
1 answer
How to stack the output of each iteration of a for loop?
I have two for loops that generate an array with the shape of (1, 3).
I want to vertically stack the result of each iteration in an array. More clearly, the final output should be a (3, 3) array where the first row is the out of the first iteration…

Hey There
- 275
- 3
- 14
0
votes
1 answer
Is it possible to pad items in a VStack in a way that only pushes the items below it downward without pushing the items above it upwards?
It's a bit hard to word in the title but here's my situation.
I have a VStack and I need to animate a gap forming below a tapped item in the stack.
I've tried adding .padding(.bottom, isTapped ? 50 : 0) to the items for example, but it doesn't…

Kabir
- 123
- 8
-1
votes
1 answer
How can I measure an item inside of a VStack in SwiftUI?
I am building an app for iOS in Xcode. New with this, as you can see.
I created a VStack, with 3 rectangles in it, all of them taking al the width of the screen (the app is only portrait):
First one is 140px high.
Second one is variable, depending…

Frikeando
- 1
- 2
-1
votes
1 answer
How do I add a vector into a specific row of a matrix?
I have a matrix and I want to add a vector into the fourth row of the matrix. I am using vstack but I am having trouble figuring out how to input it as the fourth row. If I input the new vector as either the first or second argument, it will add the…

camaya3
- 57
- 4
-1
votes
1 answer
NumPy stack, vstack and sdtack usage
I am trying to better understand hstack, vstack, and dstack in NumPy.
a = np.arange(96).reshape(2,4,4,3)
print(a)
print(f"dimensions of a:", np.ndim(a))
print(f"Shape of a:", a.shape)
b = np.arange(201,225).reshape(2,4,3)
print(f"Shape of b:", b)
c…

Amit Agarwal
- 45
- 7
-1
votes
2 answers
How to reshape an array from vstack into regular stack?
I accidentally used np.vstack(x) instead of np.stack(x, axis=0). Is there a way to reshape that resulting array from vstack into the regular stack(x, axis=0)?
I have the resulting .npy saved on my computer, so if this is possible you just saved me 6…

Katsu
- 8,479
- 3
- 15
- 16
-1
votes
1 answer
VStack will not fill screen
I use this Exact code and the screen is still not filled completely. What am I missing?
This is the main appView:
@main
struct HistoryMarkerApp: App {
@StateObject var firestoreManager = FirestoreManager()
init() {
…

wwarren07
- 17
- 9
-1
votes
1 answer
How to Vstack sheet view buttons
import SwiftUI
struct SecondView: View {
var name: String
var body: some View {
Text("Main Dishses \(name)")
}
}
struct ContentView: View {
@State private var showingSheet = false
var body: some View {
…
-1
votes
2 answers
leading edge for VStack in SwiftUI
I want to create a VStack of many Texts with 20 points of spacing between each Text. I want my VStack to be aligned to left side of the screen(or leading side of parent View).

arsalan_h
- 41
- 4
-2
votes
2 answers
How can i iteratively stack rows in numpy using for loop
I am trying to iteratively add rows to my two dimensional np.array
A = np.zeros((1,14),dtype = float)
for i in arr:
A = np.vstack(fn(i))# function returns array
And as a result i always get only last array i stacked
Can someone please…

programer
- 3
- 3
-3
votes
1 answer
Where is the extra padding coming from in my VStack?
I am trying to create a very simple SwiftUI view where I show an image with some text right below it. However, whenever I add a custom image from Assets(system images look fine), there is a little bit of extra space between the image and the text.…

Cameron Henige
- 368
- 2
- 17