FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

linear模式在最后一页删除最后一个元素时显示问题。

Open xdh725 opened this issue 1 year ago • 0 comments

.linear 模式下在在最后一页删除最后一个元素时,attributes的计算正确,但是短时间内执行了两次,最后一次正确的执行结果并没有被页面刷新,可能是动画效果导致的。 解决方式: 在FSPagerView文件下修改 line478 为

    @objc(reloadData)
    open func reloadData() {
        self.collectionViewLayout.needsReprepare = true
        UIView.animate(withDuration: 0, animations: { self.reloadData() }, completion: { _ in })
    }

xdh725 avatar Sep 02 '22 08:09 xdh725