This commit is contained in:
2025-12-17 20:37:53 +08:00
parent 8aa43d723a
commit 85012eab78
2 changed files with 27 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#import "KBSkinCardCell.h"
#import "KBSearchVM.h"
#import "KBSearchThemeModel.h"
#import "KBSkinDetailVC.h"
static NSString * const kResultCellId = @"KBSkinCardCell";
@@ -113,6 +114,17 @@ static NSString * const kResultCellId = @"KBSkinCardCell";
return cell;
}
#pragma mark - UICollectionViewDelegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
KBSearchThemeModel *model = self.resultItems[indexPath.item];
NSString *themeId = [model.themeId stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (themeId.length == 0) { return; }
KBSkinDetailVC *vc = [[KBSkinDetailVC alloc] init];
vc.themeId = themeId;
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - UICollectionViewDelegateFlowLayout
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {