我试图在第一部分滚动到视图之外时删除它。
我使用下面的委托方法尝试了它,但由于我没有页脚视图,所以没有帮助。
func tableView(_ tableView: UITableView, didEndDisplayingFooterView view: UIView, forSection section: Int)
Run Code Online (Sandbox Code Playgroud)
另外,我尝试使用滚动视图委托
func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool){
let indexPath = tableView.indexPathsForVisibleRows?.first
if indexPath?.section == 1 {
//remove View
}
}
Run Code Online (Sandbox Code Playgroud)
你能告诉我如何检测第一部分何时消失?