Open yeahohooh opened 3 years ago
+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
如果在初始化的时候不调用reloadItemsCount,会导致不自动轮播。 比如我是在网络请求后使用的reloadItemsCount