Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
144 views

The following code will render a list of items and a button to shuffle them and change their height withAnimation. If you scroll down and shuffle it you will eventually see glitches in the animation, ...
styke's user avatar
  • 2,186
0 votes
1 answer
233 views

I am trying to create a ScrollView with a LazyVStack where two headers are pinned at the top. It should also work within a NavigationStack using large display mode for the title. Both headers should ...
merkredez's user avatar
1 vote
0 answers
68 views

I want to set the scroll position of a ScrollView containing a LazyVStack such that it shows a view nested arbitrarily deeply within that stack. Currently I give the view which should be scrolled to ...
Johann Schwarze's user avatar
0 votes
1 answer
496 views

Here's a full code example of an attempt at a double sticky header view: struct ContentView: View { var body: some View { ScrollView(showsIndicators: false) { LazyVStack(...
soleil's user avatar
  • 13.3k
0 votes
0 answers
74 views

I am having some issues with sticky footers on PinnedScrollableViews in SwiftUI for iOS. I am working on a LazyVStack embedded in a ScrollView with footers on each section of the LazyVStack. The size ...
Jansche's user avatar
1 vote
2 answers
269 views

I have a `PhotosPicker` that selects an image. Then, upon pressing the "Save" button, I save it in `FileManager` and store its path in `CoreData`. When I need to retrieve them, I use a `...
Олександр Романюк's user avatar
0 votes
1 answer
171 views

My problem is with SwiftData not updating the object which is used with @Query. here are my code This is my View which used to show list of books, struct ReadingView: View { @Environment(\....
bhumi's user avatar
  • 59
0 votes
0 answers
397 views

I'm working with SwiftUI and trying to do a ScrollView that can be filtered (it's basically a list). The stack looks like this: class ViewModel: ObservableObject { @Published var isRefreshing =...
André's user avatar
  • 326
1 vote
0 answers
217 views

I am trying to write my own MyScrollView to manage scroll. I am doing this because I want to have a LazyVStack with items that have varying heights and for which I can scroll to any item inside. So, ...
InsightClip's user avatar
  • 1,038
1 vote
0 answers
220 views

I have problem with zIndex in my app with collection of images I've added pinch zoom to the image, but when image is zoomed it does not get on top of other images which are next in the collection. ...
Nazarii Krypiak's user avatar
3 votes
1 answer
1k views

I have a stack of cards, each card having a TextField, when focus a text field positioned at the bottom of the screen (on the area where the keyboard will appear) the card disappears, thus the ...
Sorin Lica's user avatar
  • 7,844
2 votes
1 answer
2k views

I'm trying to create sticky header with manual scroll to functionality (eg. categories bar allowing user to move to chosen section). I have issues with one part of that functionallity. While ...
Kamajabu's user avatar
  • 516
1 vote
1 answer
764 views

I want to print the currently displayed item in LazyVStack which is inside scrollview with paging enabled. i have tried printing in onAppear of VerseView The issues with printing inside onAppear are- ...
Jaseel.Dev's user avatar
3 votes
3 answers
1k views

I use LazyVStack because I need to load a big list of elements, LazyVStack helps with loading fewer elements, hence the scroll bar/indicator does not know the real size of the list, causing ...
dhaval123's user avatar
0 votes
0 answers
213 views

There is very poor performance when pulling scroll bar indicator to bottom and scrolling cells with big ordinal numbers. But if we comment empty ViewModifier applied to cell, everything became ok. ...
sugar baron's user avatar
0 votes
1 answer
253 views

I am building an app with a feed of videos which looks like TikTok or Facebook Reels, in a sense that I want one post using fullscreen so the video use the entire space. It seems not working, and only ...
Seb's user avatar
  • 3,255
3 votes
2 answers
2k views

I'm experiencing this issue and not user if it's a swift ui bug or expected behaviour. Could not find something related to this online. Given this view struct ContentView: View { var body: some View ...
Daniel's user avatar
  • 1,263
0 votes
0 answers
492 views

I have a manga series detail view that displays the series information and all of the chapters. Each chapter you can tap on to read and it will present the reader with a fullScreenCover. When rotating ...
Aaron Treinish's user avatar
3 votes
1 answer
971 views

I make a simple app for displaying image list. I use a LazyVStack inside ScrollView as container, ForEach to load every image Images are loading from network, I have tried AsyncImage, but AsyncImage ...
yww's user avatar
  • 51
3 votes
1 answer
814 views

I'm trying to create a multiple layered scrollView with each layer being pinned when scrolling through the list. Currently, the pinnedViews are pinned on top of each other when scrolling to the bottom....
Wouter van de Ven's user avatar
1 vote
2 answers
4k views

I am using a List in my app with some rows containing VStacks. I'm using a list and not a LazyVStack inside a ScrollView because I want to leverage some of the List features such as moving rows, ...
alionthego's user avatar
0 votes
0 answers
268 views

LazyVstack insde TabView wrapped on scrollView not working (performance issue) var body: some View { ScrollView { Text("hello, world!") TabView(selection: $tab) { ...
Adel Radwan's user avatar
0 votes
1 answer
830 views

I am trying to make a grid which has multiple columns using a lazyvstack. I want the items to align perfectly, regardless of its length. This is what I want: However, with my code down below, I am ...
Gura's user avatar
  • 15
2 votes
1 answer
748 views

I followed ViewThatFits tutorial mentioned here, to show and hide a text according to its length and the available space as follows: struct ExpandableText: View { let text: String let ...
JAHelia's user avatar
  • 8,000
6 votes
3 answers
4k views

TL;DR: Is there some parameter or way to set the offset at which LazyVStack initialises views? LazyVStack initialises the views lazily, so when I scroll, the next (few?) views are initialised. I am ...
ambassador's user avatar
1 vote
1 answer
837 views

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, ...
Sarth Shah's user avatar
0 votes
1 answer
865 views

How does a LazyVStack in SwiftUI decide if it needs to re-render a View, assuming the Identifiable property of an item it is rendering does not change? This trivial demo code below, I feel, should not ...
esilver's user avatar
  • 28.6k
2 votes
2 answers
1k views

I have a ScrollView with a LazyVStack which holds n subviews. Each subview has a button which will present a confirmation dialog, the confirmation dialog is created inside the child. the confirmation ...
Javier Heisecke's user avatar
2 votes
1 answer
673 views

(Modified title and added Contact List example with code and behavior differences between Lists and LazyVStack/ForEach.) Within a NavigationView/LazyVStack, mutually-exclusive ForEach loops group ...
SwiftAero's user avatar
3 votes
2 answers
3k views

I've been following a youtube tutorial for using LazyVStacks. https://www.youtube.com/watch?v=o6D7mUXjSmI When I run the same code as per the tutorial, the LazyVStack using Xcode Version 13.2.1 (...
GVG's user avatar
  • 647
1 vote
1 answer
4k views

I'm building a chat app using SwiftUI and I'm having difficulties getting a LazyVStack to work inside a ScrollView. Here are my questions: Question 1 Where I have .id(message.id), why is this id ...
GVG's user avatar
  • 647
1 vote
1 answer
871 views

I have a bunch of cells in a vertical scroll view, but am seeing some weird behavior from the onTapGesture and fullScreenCover for those cells. When I click on a cell, it registers the correct cell in ...
Noah Iarrobino's user avatar
0 votes
1 answer
376 views

I have the following grid made in SwiftUI with this code: let columnGrid = [GridItem(.fixed(boxWidth), spacing: 0), GridItem(.fixed(boxWidth), spacing: 0), ...
123432198765's user avatar
12 votes
1 answer
5k views

are lists in SwiftUI really lazy? I am having a list of 5000 elements fetched from coreData and I want to display them in a list. I read a lot of comments (like that: https://developer.apple.com/...
printDavid's user avatar
0 votes
0 answers
1k views

I have a LazyVStack in a scrollView with many images. The size of the images in the scrollView is quite small, about 300x300 points. The images are extracted from Data stored in CoreData. The ...
alionthego's user avatar
9 votes
4 answers
12k views

When I use a List view I can easily add the refreshable modifier to trigger refresh logic. My question is how to achieve the same when using a LazyVStack instead. I have the following code: struct ...
zumzum's user avatar
  • 20.7k
-1 votes
1 answer
3k views

In my app, LazyVGrid re-builds its contents multiple times. The number of items in the grid may vary or remain the same. Each time a particular item must be scrolled into view programmatically. When ...
Alexander Poleschuk's user avatar
5 votes
1 answer
2k views

I have a LazyVStack which I would like to only update one view and not have all others on screen reload. With more complex cells this causes a big performance hit. I have included sample code import ...
Jacob Zyla's user avatar
0 votes
0 answers
638 views

A lot of sites online that demonstrate using a Lazy stack to load a lot of views use e.g. ForEach(1...100, id: \.self) { value in to demonstrate usage. But in a production app with complex views I ...
GarySabo's user avatar
  • 6,830
3 votes
5 answers
4k views

I have a LazyVStack, with lots of rows. Code: struct ContentView: View { var body: some View { ScrollView { LazyVStack { ForEach(0 ..< 100) { i in ...
George's user avatar
  • 31k
4 votes
0 answers
655 views

I have a simple LazyVStack with a custom view. I noticed that when it is scrolled under the navigation bar the view disappears prematurely. Is there a good work around of this besides to disable ...
Scott Andrew's user avatar
1 vote
2 answers
767 views

I have a checklist made with LazyVStack, I implemented remove functionality for the checklist items, but for some reason the app crashes with "Index out of range" only when I try to remove ...
Hussein's user avatar
  • 642
4 votes
2 answers
3k views

I have a List and about 1000 item in an Array, and my items update in realtime (100 updates/s). My List is very non-performant. This my test code (I tried with List and LazyVStack): struct ...
Tiến Đức Nguyễn's user avatar
2 votes
1 answer
720 views

Here's a simple example: struct Example: View { var body: some View { ScrollView([.horizontal, .vertical], showsIndicators: false, content: { LazyVStack(content: { ...
Randex's user avatar
  • 800
2 votes
0 answers
226 views

I'm building my own custom list using LazyVStack with swipeable actions thanks to this tutorial: https://prafullkumar77.medium.com/swiftui-how-to-make-custom-swipe-able-cell-727a27abdddd It isn't half ...
Beau's user avatar
  • 43
7 votes
0 answers
3k views

I've had many similar issues to this when using ScrollViewand LazyVStack/ LazyHStack where the content of the lazy stack will stutter upon bouncing on the edge of the ScrollView. First I thought it ...
seriouslysupersonic's user avatar
1 vote
1 answer
656 views

I have a LazyVStack presenting Cells. My main View which has the LazyVStack has a viewModel. @StateObject private var model = ViewModel() The Stack presents a list of CustomViews. LazyVStack { ...
PoolHallJunkie's user avatar
1 vote
1 answer
2k views

I have a LazyVStack in my UI and after device rotation the rows showing are not the same as prior to rotation. Not even close to those rows. Prior to SwiftUI I was handling this by getting the last ...
alionthego's user avatar
1 vote
0 answers
1k views

Here is a simple macOS demo app that compares using a SwiftUI List and a LazyVStack. I prefer to use a LazyVStack because it's easier to customize the style. But it seems some of the built-in ...
Clifton Labrum's user avatar
1 vote
0 answers
447 views

Inside of a Scrollview I use a LazyVStack with a pinned header, and based on the scroll position I manipulate the scale of that header. In the LazyVStack, I have a ForEach iterating over some list of ...
bze12's user avatar
  • 803