ZCycleView
ZCycleView copied to clipboard
reloadItemsCount在初始化时不使用的话--->会导致不触发自动轮播
如果在初始化的时候不调用reloadItemsCount,会导致不自动轮播。 比如我是在网络请求后使用的reloadItemsCount
+1
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 来开启
居然还要这么多Star
+1