We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift中,self.pagingView.listContainerView无法转换为JXCategoryViewListContainer协议类型,导致self.categoryView.listContainer = listContainer无法执行,因此无法切换联动,swift中应该如何设置呢?
The text was updated successfully, but these errors were encountered:
// 1. 定义适配器类 class ListContainerAdapter: NSObject, JXCategoryViewListContainer { func contentScrollView() -> UIScrollView! { return containerView?.scrollView ?? UIScrollView() } private weak var containerView: JXPagerListContainerView? init(containerView: JXPagerListContainerView) { self.containerView = containerView super.init() } func setDefaultSelectedIndex(_ index: Int) { containerView?.setDefaultSelectedIndex(index) } func reloadData() { containerView?.reloadData() } func didClickSelectedItem(at index: Int) { containerView?.didClickSelectedItem(at: index) } } // 2.创建适配器并关联 let adapter = ListContainerAdapter(containerView: pagerView.listContainerView) categoryTitleView.listContainer = adapter 这样可以解决Swift遵循OC协议。
Sorry, something went wrong.
No branches or pull requests
swift中,self.pagingView.listContainerView无法转换为JXCategoryViewListContainer协议类型,导致self.categoryView.listContainer = listContainer无法执行,因此无法切换联动,swift中应该如何设置呢?
The text was updated successfully, but these errors were encountered: