Skip to content
Discussion options

You must be logged in to vote

测试下来 List 方案确实是最好的

List

List {
    ForEach(0..<100, id: \.self) { i in
        MarkdownView(fullText)
    }
}
2025-03-29.20.00.05-1080P-1500Kbps.mp4

List 应该是 CollectionView 驱动的,有类似渐进式加载的感觉

ScrollView + LazyVStack

ScrollView {
    LazyVStack {
        ForEach(0..<100, id: \.self) { i in
            MarkdownView(fullText)
        }
    }
}
2025-03-29.20.03.27-1080P-1500Kbps.mp4

确实有比较大概率出现高频跳动的问题,看起来是一次性估算了一个大小,右侧滚动条没有渐进式的跳动

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by LiYanan2004
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant