I use TabView to browse albums because I need a paging function, but my album has thousands of pictures, and TabView is very slow to process. Is there any way to lazy loading so that TabView can handle thousands of data.
TabView(selection: $assetModel.identifier) {
ForEach(0..<7000) { index in
let asset = assetModel.assetArray[index]
AssetPreviewItemView(asset: asset)
.tag(asset.localIdentifier)
}
}
.tabViewStyle(.page(indexDisplayMode: .always))
.indexViewStyle(.page(backgroundDisplayMode: .always))