Comments (2)
需要加入 在VC中加入 [self.pageView performSelector:@selector(scrollViewDidScroll:) withObject:scrollView]; 解决问题(参考的WMZPageController)
大佬是不是我用的不对 ,你看下代码
`- (void)viewDidLoad { [super viewDidLoad];
WMZPageParam *param = PageParam() .wMenuHeadViewSet(^UIView *{ UIImageView *image = [UIImageView new]; [image sd_setImageWithURL:[NSURL URLWithString:@"https://upload-images.jianshu.io/upload_images/9163368-02e26751674a3bc6.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"]]; image.frame = CGRectMake(0, 0, PageVCWidth, 300); return image; }) .wTitleArrSet(@[@"精选",@"好货",@"精选",@"好货"]) .wViewControllerSet(^UIViewController * _Nullable(NSInteger index) {
// return NSClassFromString(@"TopSuspensionVC").new; /// 带滚动视图需实现协议 TopSuspensionView *view = TopSuspensionView.new;
view.page = index; /// 这里为了方便使用 使用同一个属性 所以这里为了去除警告强转一下类型 但是实际类型还是UIView return (UIViewController*)view; }) .wTopSuspensionSet(YES)
// .wMenuHeightSet(50)
// .wTopSuspensionSet(YES) // //No为从自定义导航栏顶部开始 yes为从自定义导航栏底部开始 // // .wFromNaviSet(NO) // //顶部可下拉 // // .wBouncesSet(NO)
; /// frame可以设置任意frame autoFix为YES self.pageView = [[WMZPageView alloc]initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, self.view.bounds.size.height - 200) autoFix:NO param:param parentReponder:self]; self.pageView.downSc.dataSource = self ; self.pageView.downSc.delegate = self ; [self.view addSubview:self.pageView]; param.wEventClickSet(^(id _Nullable anyID, NSInteger index) { NSLog(@"%@ %ld",self.pageView.upSc.currentVC,self.pageView.upSc.currentTitleIndex); }); /// autoFix为NO 自己调整frame
// WMZPageView *pageView = [[WMZPageView alloc]initWithFrame:CGRectMake(0, 0, PageVCWidth, PageVCHeight - PageVCNavBarHeight) autoFix:NO param:param parentReponder:self]; // [self.view addSubview:pageView]; }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
}
cell.textLabel.text = @"自定义视图";
cell.detailTextLabel.text = @"自定义cell";
return cell;
}- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return 100;
}- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 4;
}//注释这段代码会出现 滚动冲突
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
[self.pageView performSelector:@selector(scrollViewDidScroll:) withObject:scrollView];
}`
没看出什么 是什么问题
from wmzpagecontroller.
就是 不在VC 里写上
(void)scrollViewDidScroll:(UIScrollView *)scrollView{
[self.pageView performSelector:@selector(scrollViewDidScroll:) withObject:scrollView];
}
这段代码,
view内的tableview 滚动 会 带着 vc 里的tableview 一起滚动
from wmzpagecontroller.
Related Issues (20)
- 多层嵌套存在滚动手势干扰嵌套问题
- Will members be affected?
- 这种效果可以实现吗? HOT 1
- 导航栏适配 HOT 2
- 怎么动态更新HeadView的高度? HOT 5
- 怎么动态刷新菜单栏标题的颜色以及下面的指示器图片,菜单栏中有自定义的标题 HOT 2
- wViewControllerSet
- 请问使用红点标题类型时,怎么让红点和角标不消失 HOT 2
- 请问想要监听页面上下偏移量应该使用哪个回调
- 当使用了悬浮(导航栏透明度变换)+顶部刷新后,如果在继承的控制器内监听页面偏移量会出现页面无法滚动 HOT 1
- 当WMZPageController不满一屏时,悬浮和内容有问题 HOT 2
- 请问怎么设置自定义menuItem背景图片,我的图片是不规则的
- 怎么重置选中的index呢?
- 菜单栏 按钮右上角的角标 badge 可以自定义Label的属性吗?我这需要改变badgeLabel的背景色和字体大小
- 2层嵌套
- 悬浮状太下的问题
- 两层嵌套时往右滑动会没响应
- 下拉刷新问题
- 显示SVProgressHUD问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wmzpagecontroller.