From 2c4a4329ffb82681a7f403135d4b27e967882c46 Mon Sep 17 00:00:00 2001 From: CodeST <694468528@qq.com> Date: Sun, 9 Nov 2025 16:05:42 +0800 Subject: [PATCH] 2 --- keyBoard/Class/Home/VC/HomeRankVC.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/keyBoard/Class/Home/VC/HomeRankVC.m b/keyBoard/Class/Home/VC/HomeRankVC.m index 20fabcc..68ad23e 100644 --- a/keyBoard/Class/Home/VC/HomeRankVC.m +++ b/keyBoard/Class/Home/VC/HomeRankVC.m @@ -131,7 +131,14 @@ // 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。 - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { NSLog(@"%@", NSStringFromSelector(_cmd)); - self. + // 拿到当前显示的列表 VC(已创建/显示过的会记录在 validListDict 中) + id list = self.listContainerView.validListDict[@(index)]; + if ([list isKindOfClass:[HomeRankContentVC class]]) { + HomeRankContentVC *currentVC = (HomeRankContentVC *)list; + // 如需拿到对应的 collectionView,可以在这里同步一下 + self.collectionView = currentVC.collectionView; + // TODO: 在这里对 currentVC 做需要的操作 + } // 侧滑手势处理 self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0); }