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