2
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user