ZCycleView icon indicating copy to clipboard operation
ZCycleView copied to clipboard

reloadItemsCount在初始化时不使用的话--->会导致不触发自动轮播

Open yeahohooh opened this issue 3 years ago • 4 comments

如果在初始化的时候不调用reloadItemsCount,会导致不自动轮播。 比如我是在网络请求后使用的reloadItemsCount

yeahohooh avatar Apr 13 '21 05:04 yeahohooh

+1

mizhousoft avatar Apr 16 '21 05:04 mizhousoft

public func reloadItemsCount(_ count: Int) { cancelTimer() if isAutomatic { startTimer() } realItemsCount = count placeholder.isHidden = realItemsCount != 0 setItemsCount() dealFirstPage() pageControl.numberOfPages = realItemsCount pageControl.currentPage = getCurrentIndex() % realItemsCount }

应该把 if isAutomatic { startTimer() } 这代码放到最后去,根据最新的 itemCount 来开启

mizhousoft avatar Apr 16 '21 06:04 mizhousoft

居然还要这么多Star

blockshark avatar Aug 06 '21 09:08 blockshark

+1

Mr-ZNN avatar Apr 20 '22 08:04 Mr-ZNN