This commit is contained in:
2025-11-17 15:39:03 +08:00
parent dc813fcabc
commit d849b201ca
7 changed files with 59 additions and 19 deletions

View File

@@ -11,7 +11,8 @@
#import "HomeHotCell.h"
#import "HomeRankVC.h"
#import "KBSearchVC.h"
#import "HomeRankDetailPopView.h"
#import "LSTPopView.h"
#import <HWPanModal/HWPanModal.h>
@interface HomeHotVC () <UITableViewDataSource, UITableViewDelegate>
@@ -81,12 +82,39 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
KBSearchVC *vc = [[KBSearchVC alloc] init];
// KBSearchVC *vc = [[KBSearchVC alloc] init];
// [self.navigationController pushViewController:vc animated:true];
UINavigationController *nav = KB_CURRENT_NAV;
// UINavigationController *nav = KB_CURRENT_NAV;
// [nav pushViewController:vc animated:true];
NSLog(@"===");
// ->
NSDictionary *d = self.dataSource[indexPath.item];
//
CGFloat width = MIN(KB_SCREEN_WIDTH - 76, 420);
HomeRankDetailPopView *content = [[HomeRankDetailPopView alloc] initWithFrame:CGRectMake(0, 0, width, 460)];
NSString *title = d[@"title"] ?: @"High EQ";
NSString *people = d[@"people"] ?: @"Download: 1 Million";
NSString *desc = @"Be Neither Too Close\nNor Too Distant"; //
[content configWithAvatar:nil title:title download:people desc:desc];
//
LSTPopView *pop = [LSTPopView initWithCustomView:content
parentView:nil
popStyle:LSTPopStyleScale
dismissStyle:LSTDismissStyleScale];
pop.hemStyle = LSTHemStyleCenter; //
pop.bgColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
pop.isClickBgDismiss = YES; //
pop.cornerRadius = 0; // view
__weak typeof(pop) weakPop = pop;
content.saveHandler = ^{ [weakPop dismiss]; };
content.closeHandler = ^{ [weakPop dismiss]; };
[pop pop];
}
#pragma mark - Lazy