All Questions
Tagged with swiftui-zstack swift
12 questions
3
votes
3
answers
492
views
Moving an image over a sheet SwiftUI
In a screen design, I am showing a sheet from the bottom, and in this section I want to move an image above the sheet part. In this part, when I move it up with offset, it only remains in the sheet, ...
1
vote
2
answers
1k
views
Layout a view's vertical position inside Zstack in SwiftUI
I'm facing some challenges to layout this prototype in SwiftUI.
I used ZStack to layout the views. But my main problem is to position the profile image view's first half on the top the red background ...
0
votes
0
answers
40
views
Take over TabView's view but keep the tabs visible
When someone clicks on Notification, I want to show a view. However, I still want tabs visible at the bottom of the screen so they can go back to whatever tab they want.
I tried adding invisible ...
0
votes
1
answer
748
views
How to start the overlay after last Text from the view in SwiftUI?
I have a ScrollView with some text in it and I want to use .overlay for an Image to start after last Text or element from the view.
In a simple way I used Color to showcase what I have and what I want ...
1
vote
1
answer
74
views
isssue with ZStack and list
I have a RocketView View to view SpaceX rockets with the SpaceX API.
I have an issue with ZStack or VStack in the RocketCell View where the cell is not showing the whole image in the list.
How can I ...
0
votes
3
answers
9k
views
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.
...
0
votes
1
answer
166
views
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 {
...
1
vote
0
answers
257
views
ZStack explicit animation not working when conditionally hiding/showing a view
I want to create some sort of banner view that either moves in or out with animations when some state changes in SwiftUI. It feels like a basic task to do but the transition when showing the banner is ...
5
votes
2
answers
4k
views
In SwiftUI what is an easy way to align more than one view in ZStack
I have a view and I want to add two icons to it, at top right side and at bottom right side. I managed to do that:
I used two ZStacks:
ZStack(alignment: .bottomTrailing)
{
ZStack(alignment: ....
1
vote
2
answers
1k
views
SwiftUI: Animate Transitions
How can I animate slide transitions between different views?
In following sample code I made a Picker that chooses which view to show and my goal is to have a transition that looks similar to the ...
3
votes
2
answers
548
views
How to align text within a SwiftUI ZStack for smaller screen sizes?
I'm attempting to align a Text view within a ZStack. It works fine for larger screens like the iphone 11 plus max but on smaller screens the text will go off screen if I use trailing or leading ...
2
votes
2
answers
633
views
Prevent last rows in List to be covered by other view in ZStack
I have a List partially covered by a translucent view (let's call it the overlay). My problem is that for long lists last rows are not accessible since they are covered by the overlay.
I'm using a ...