IOS-M3-07 优化 scrollProgress 精度 #35

Closed
opened 2026-06-02 21:15:06 +08:00 by wangdl · 0 comments
Owner

问题

scrollProgress 依赖 contentHeightEstimate(每 block 固定 80px),导致滚动进度不准确。

// MaterialReaderView.swift L244
scrollProgress = min(1, max(0, -offset / max(contentHeightEstimate, 1)))

剩余工作

  1. 使用 GeometryReader/PreferenceKey 获取实际内容高度
  2. 用实际高度替代 contentHeightEstimate
  3. 确保 scrollProgress 精度达到逐 block 级别

依赖

  • #34 contentHeightEstimate 修复相关联

涉及文件

  • MaterialReaderView.swift
## 问题 `scrollProgress` 依赖 `contentHeightEstimate`(每 block 固定 80px),导致滚动进度不准确。 ```swift // MaterialReaderView.swift L244 scrollProgress = min(1, max(0, -offset / max(contentHeightEstimate, 1))) ``` ## 剩余工作 1. 使用 GeometryReader/PreferenceKey 获取实际内容高度 2. 用实际高度替代 contentHeightEstimate 3. 确保 scrollProgress 精度达到逐 block 级别 ## 依赖 - 与 #34 contentHeightEstimate 修复相关联 ## 涉及文件 - `MaterialReaderView.swift`
wangdl added this to the M3:iOS 资料阅读闭环 milestone 2026-06-02 21:15:06 +08:00
Sign in to join this conversation.
No description provided.