Questions tagged [zstack]

68 questions
1
vote
0 answers

ZStack - IOS 14 beta - Zstack fly on the keyboard

In new IOS 14 beta i use ZStack to display badge on my tabs. When keyboard is appear - zstack fly on the keyboard, but it must be fixed in the bottom. IOS 13 - has nothing like this. ZStack { Circle() …
0
votes
1 answer

I want to remove 1 color channel from a tif in zcyx and save it in zyx

I though it would be as simple as picking 1 color and keeping the rest of the axis the same. from tkinter import filedialog import tifffile as tif import os def SplitChannel(ImName): TifIm = tif.imread(ImName) return TifIm[:,1,:,:] #for…
0
votes
0 answers

swiftui zstack are not fully centered

My code is as bellow: struct Clock10View: View { let light: Bool var body: some View { ZStack() { Rectangle() .frame(width: 6, height: 6) .foregroundColor(.gray) Rectangle() …
mars
  • 109
  • 5
  • 21
0
votes
0 answers

Returns the contents of a scrollview to its initial position SwiftUI

Hi everyone I'm working on a horizontal scrolling with views placed inside a ZStack The positions of the overlapping views are handled by an offset like this Test1(currentIndex: $currentIndex, size: size) .offset(x: -size.width *…
kAiN
  • 2,559
  • 1
  • 26
  • 54
0
votes
3 answers

Is there a way to move HStack to leading?

I am having a problem with HStack which has bigger width than the parent view showing centre not leading. struct WidgetEntryView : View { var entry: Provider.Entry var body: some View { ZStack { Color(.red) …
Alejandro
  • 5
  • 3
0
votes
1 answer

SwiftUI ZStack and Xcode 3D View Hierarchy

I'm learning SwiftUI. When I have a ZStack say ZStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Text("Hello, world!") } I am expecting that the Text is overlayed on top of the Image. Why…
newbie py
  • 53
  • 1
  • 5
0
votes
0 answers

How to merge two stacks in which one is multicolored in Fiji

I wanted two merge two stacks, one is the red channel and the other is the result of the Z-stack depth color code plugin, meaning that it's color coded according to the depth. How can I do this without losing the colors? The idea is to then…
0
votes
2 answers

I want to draw this two rectangles in SwiftUI

I'm struggling on creating two vertical bars with lines and dash box. I would like to receive some suggestion on how to do this. This is what I'm aiming to do: Currently this is my code. import SwiftUI struct LoadManagementItemBarView: View { …
0
votes
1 answer

Zstack alignment issue on NavigationView

Two circles on Zstack is not align if view is render on NavigationView. struct SpinnerView: View { @State private var isLoading = false var body: some View { NavigationView { ZStack { …
Rocker
  • 1,269
  • 7
  • 15
0
votes
1 answer

Why ZStack not getting rotated and scaled , But the inside contents getting

I am applying rotation gesture and magnify gesture in a ZStack. But the ZStack is not getting rotated , but the image inside the ZStack is getting rotated and scaled upon the gesture while I did applied the rotation and scale on ZStack. Here is My…
0
votes
1 answer

SwiftUI Align VStack Top Leading in ZStack

I have a Stack I am using to create a graph with 2 different lines, but I also want to have 2 labels on the graph. I want these labels to be in the top left of the ZStack but cannot figure out how. Here's what I've tried: ZStack { …
tHatpart
  • 1,302
  • 3
  • 12
  • 27
0
votes
0 answers

SwiftUI - CardView with image Overlapping bottom banner

I'm trying to create a card view with cornerRadius of 10 using SwiftUI and the Image should overlay the bottom banner in blue. I'm sending the image of what I'm trying to achieve. I'm new to SwiftUI and tried many options, but it doesn't seem to get…
Tech UK
  • 37
  • 6
0
votes
1 answer

How can I position 1 image relative to another in a ZStack in SwiftUI?

I have 2 images in a ZStack. How can I position image "x.circle" to the top right of the image "person.fill"? ZStack { Image(systemName: "person.fill") .font(.system(size: 200)) Image(systemName:…
Vaz
  • 309
  • 2
  • 15
0
votes
1 answer

is there a UIKit equivalent to SwiftUI's zstack?

I'm trying to create something like this. I've been working with SwiftUI recently so I know I could create that by adding an image, text and button (the I'm flexible text is the label for a button/NavigationLink) to a zstack. but I'm looking around…
zamanada
  • 158
  • 13
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