Questions tagged [swiftui-zstack]

26 questions
0
votes
0 answers

Opacity of the button affects its "clickability"

I've run into a very strange issue. I have a SwiftUI app (iOS) where I have a full-screen ZStack: inside, as a "bottom layer", I have a full-screen Map, and on top I have a button (it is LocationButton - but it doesn't really matter, the behaviour…
Dmytro Titov
  • 2,802
  • 6
  • 38
  • 60
0
votes
1 answer

Show fullscreen popup in SwiftUI

I'm having problems showing fullscreen popups in SwiftUI. My app structure is a MainView with a TabView with 2 tabs. This is a sample of my app structure: struct UIMainView: View { var body: some View { ZStack { …
Wonton
  • 1,033
  • 16
  • 33
0
votes
2 answers

VStack flashing of space between views

The VStack has two components header and detail. When we tap on the "show" button, it shows the View (header + detail of the VStack). However, it results in Flashing effect when the view Slides in. After the animation is complete the View spacing…
NNikN
  • 3,720
  • 6
  • 44
  • 86
0
votes
1 answer

How to bring an Image to foreground in LazyVStack/ScrollView SwiftUI?

I have a LazyVStack of Post Views with images in those views (similar to Instagram). When I'm zooming in on one of the images, I would like for that image to overlap over all other content. However, currently what's happening is it overlaps over…
Sarth Shah
  • 73
  • 4
0
votes
1 answer

SwiftUI ZStack not showing bottom element with List

When put Image to the bottom of ZStack , image just not showing struct ContentView: View { var body: some View { VStack{ ZStack{ Image(systemName:"folder") // not showing .resizable() …
Dikey
  • 111
  • 1
  • 8
0
votes
2 answers

SwiftUI-How to make background colour fill up the entire screen

I'm trying to make an app and I want to have a background colour for the app so I put the colour in the assets folder but the colour only fills up 3 quarters of the screen, leaving the top half empty. I had a ZStack so I put…
Zudoturiku
  • 121
  • 7
0
votes
1 answer

Why does adding a HStack inside a VStack wreck size calculations for a ZStack bubble around text elements?

I want to produce a bubble-like view with various pieces of text on a rounded rectangle background, sized to fit the text. I have arrived at this: var body: some View { HStack { Spacer() ZStack(alignment:…
Adam Eberbach
  • 12,309
  • 6
  • 62
  • 114
0
votes
2 answers

SwiftUI: Different alignment behavior of containers in GeometryReader

A Text element inside a ZStack(alignment: .bottom) is displayed at the bottom of the container (as expected). Tho, if the same ZStack is inside a GeometryReader, the alignment does not behave the same anymore. This code: var body: some View { …
Dominik Seemayr
  • 830
  • 2
  • 12
  • 30
0
votes
1 answer

SwiftUI List - some part of row content is overlapped by next row

When I am trying to add a plus button, which is overlapped on two rows of the list. The code works fine for cases: 1) When view will appear, 2) Scrolling from top to bottom (Every time). However, the code is not working properly when I scroll from…
iOSDev AI
  • 3
  • 3
0
votes
1 answer

How to create constraints for SwiftUI images to maintain their position across different device formats?

I have the following code in SwiftUI, where I use the .offset modifier to set specific positions for images in a ZStack. However, when I change to a different device format, the images move away from their intended positions. Is there a way to…
Martin
  • 46
  • 9
-1
votes
1 answer

How to align ZStack View to elements in a view below it

I have some vstack views, and a zstack view (its a dropdown menu). I need the top of the zstack view to align itself perfectly with the text of VStack 2 Text like this I think I need to utilize named coordinate spaces, but I have been unsuccessful…
Ungrace
  • 214
  • 2
  • 12
1
2