Questions tagged [hstack]

A Swift UI view that arranges its children in a vertical line.

This document contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

HStack - SwiftUI | Apple Developer Documentation

153 questions
0
votes
0 answers

Load and parse json from server into HStack on launch

Is it possible to get an HStack to load a json file with an image and title into a view that when tapped loads the linked video into a default player, without using list? I've accomplished this with List however I can not seem to find a way to…
RealTechyGod
  • 121
  • 1
  • 1
  • 11
0
votes
0 answers

Hstack array function, unknown traceback error

Im so sorry for this, but I have litteraly no idea what is wrong, so I'm just gonna post all of it, its not very long, but I'm using some functions I have never used before, so I have no idea about what is wrong, it seems to be a problem with numpy…
0
votes
2 answers

How to align the center of a VStack to a point SwiftUI

I have 5 VStacks in an HStack that spans the width of the screen. The VStack contains Text Views that are all different widths because they display different text. What I want to do is align the center of each VStack so that they are evenly apart…
coder
  • 381
  • 2
  • 22
0
votes
1 answer

How to dynamically adjust the number of items in a row within a vertically scrollable VStack in SwiftUI?

Input: I have a list of View where each View is a VStack of an Image and Text Requirement: I want to display them vertical scrollable view. However, each row should have more than one of such Views (based on how many can fit). [Note that Views are…
user3213210
  • 113
  • 1
  • 2
  • 9
0
votes
0 answers

Why does the HStack make the layout render wrongly?

I'm trying to compose a view using a VStack that nests a HStack and a grid (https://github.com/spacenation/swiftui-grid). The expected outcome is that the HStack and all grid items should render. The actual outcome is that only one item of the grid…
Jobie J
  • 117
  • 5
0
votes
0 answers

Vectorization using numpy.where()

Given an array of objects: a = numpy.array([[True,False],[True,True],[True,False,True]]) Expected output: [[0],[0,1],[0,2]] Is there a way to get this output using numpy.where()(may be with numpy.vstack() or numpy.hstack()) or some other numpy…
stut
  • 11
  • 3
0
votes
1 answer

ffmpeg: how can i hstack 2 videos and display a watermark outside the video area

I'm new to using ffmpeg and I want to combine two 1920x1080 videos using hstack. The output video also needs to be 1920x1080. At the same time I want to display a watermark at the bottom of the screen (outside the video area) and one in the top…
0
votes
2 answers

Making items in HStack visible / invisible later

I have a game view that has a board and I have several parts in a VStack and the final 2 HStack are some 'buttons' and then a row of tiles for the game. VStack(spacing: 5) { HStack {} HStack {} ...... …
Lynxbci
  • 71
  • 7
0
votes
1 answer

SwiftUI: animating between Single and HStack views

Goal: 1- Shows a view (Blue) that covers entire screen 2- When tapped on bottom (top right corner), it shows an HStack animating right side HStack (Green) "Slide Offset animation". import SwiftUI struct ContentView: View { @State var…
Mane Manero
  • 3,086
  • 5
  • 25
  • 47
0
votes
1 answer

Concatenating two Text Views within an HStack container?

I wonder if someone might be able to point me in the right direction with regards to getting two Text items to sit next to each other without leaving the white gap (see image below). There are lots of spacings, borders and alignments, but after…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
0
votes
1 answer

Component-wise Product of all Column Combinations of two Matrices

As the title says I want to calculate the component-wise product of all column combinations of two matrices. I already found a solution using numpy.einsum and numpy.hstack. I wonder if there is a solution without hstack. Let a = [a_1, a_2, ..., a_n]…
paul
  • 31
  • 2
0
votes
1 answer

Full Screen View not working inside HStack and Horizontal ScrollView

I have been trying to create onboarding flow using horizontal lists etc. I have created a view called OnboardingViewand inside it I have a VStack with image, and two Text views. struct OnboardingView: View { var body: some View { GeometryReader…
Osama Naeem
  • 1,830
  • 5
  • 16
  • 34
0
votes
0 answers

I want to make a view in which I can add x number or buttons

I am trying to add buttons to a dynamic view. What I am trying to achieve us that I have an array and I want to create a list of buttons and want to fill that list horizontally first and when there is no space in screen next button should appear in…
Lalli
  • 436
  • 5
  • 12
-1
votes
0 answers

How to have images of different dimensions placed in HStack with equal width

I have 2 images with different dimensions, When I place them in HStack, the image with bigger dimension takes more space, I want both of them to have equal width. I tried below code struct HStackDemo: View { var body: some View { HStack…
Hiren Faldu
  • 127
  • 1
  • 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…
1 2 3
10
11