SwiftUI, Can CustomScrollView (made by UIViewControllerRepresentable) takes LazyVStack?

I'm using custom scrollview with UIViewControllerRepresentable and works fine But when I using with LazyVStack it doesn't work that I expected.

LazyVStack doesn't create items until it needs to render them onscreen But when I use this with custom scrollview, it draws at once.

So when I do this,

Code Block swift
ScrollView {
LazyVStack {
ForEach(0...10000, id:\.self) {
Text(String($0))
}
}
}

It works well as I expected But when I do this

Code Block swift
CustomScrollView {
LazyVStack {
ForEach(0...10000, id:\.self) {
Text(String($0))
}
}
}

It comsumes memory as I expected.

Can't I using this with custom scrollView?

Hi,
As you said, LazyVStack only creates new items when needed. I don't know what your custom Scrollview looks like and I don't know why you would want a custom Scrollview if you could just change the items inside to match what you want. What does your custom Scrollview look like?
SwiftUI, Can CustomScrollView (made by UIViewControllerRepresentable) takes LazyVStack?
 
 
Q