feat: add in-reader search and restructure documentation

- Add RDEPUBReaderSearchBarView with animated show/hide, keyword
  navigation, and match counting integrated into the reader controller
- Restructure docs: replace scattered design docs with consolidated
  BUSINESS_LOGIC.md and UML_CLASS_DIAGRAMS.md; update ARCHITECTURE.md
- Add SearchTests and FanrenParseTimeTest; enhance LargeBookOnDemandTests
- Add scripts/run_ui_regression.sh and summarize_ui_results.py for
  automated UI test execution and reporting

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-06-05 17:34:50 +08:00
co-authored by Claude Opus 4.7
parent d20196ee34
commit 0e7c0577e3
37 changed files with 4941 additions and 7621 deletions
@@ -55,6 +55,7 @@ extension RDReaderView {
collectionView.isUserInteractionEnabled = true
pageViewController.view.isUserInteractionEnabled = true
}
onToolViewVisibilityChanged?(isShowToolView)
}
/// 判断点击命中的视图是否在指定工具栏内,用于决定是否拦截点击事件
@@ -168,6 +168,10 @@ public class RDReaderView: UIView {
public var currentDisplayType: RDReaderView.DisplayType = .pageCurl
/// 工具栏显示/隐藏动画时长,默认 0.3 秒
public var toolViewAnimationDuration: TimeInterval = 0.3
/// 工具栏可见性变化回调,参数为是否可见
var onToolViewVisibilityChanged: ((Bool) -> Void)?
/// 搜索栏视图,点击时不触发 tapCenter
var searchBarView: UIView?
/// 是否启用横屏双页显示
public var landscapeDualPageEnabled: Bool = false
/// 翻页方向,默认从左往右(适用于中文/英文书籍)
@@ -777,6 +781,9 @@ extension RDReaderView: UIGestureRecognizerDelegate {
if let bottomToolView, isHitView(touch.view, inside: bottomToolView, point: point) {
return false
}
if let searchBarView, isHitView(touch.view, inside: searchBarView, point: point) {
return false
}
return true
}