UIRefreshControl 內部的標籤(如「下拉刷新」)屬於其子視圖。當 UITableView 內容較少(不滿一螢幕)時,UIRefreshControl 的 frame 可能延伸至可見區域,導致標籤覆蓋在最後一個 Cell 上方。
backgroundColor:給 TableView 設定背景色(如白色),RefreshControl 背景預設透明,標籤不會「穿透」顯示在 Cell 之上。
tableView.backgroundColor = .white
refreshControl?.backgroundColor = .clear // 或同色
UIRefreshControl 覆寫 layoutSubviews 強制調整標籤 frame,或直接使用第三方庫(如 MJRefresh)完美解決各種邊界情況。UIRefreshControl 支援 frame 自訂,可在 scrollViewDidScroll 中動態修正位置。RefreshControl 設計初衷為「隱藏在內容上方」,**前提是 ScrollView 內容高度 ≥ 視口高度**。若內容過少,務必補齊佈局或背景色遮擋。