shunfski / fsscrollviewnesttableview Goto Github PK
View Code? Open in Web Editor NEW这是一个scrollView嵌套tableView的手势冲突解决方案
这是一个scrollView嵌套tableView的手势冲突解决方案
设置
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:20 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];
没有效果
下面滚动的视图同时有uicollectionview和tableview 或只有uicollectionview的时候还是有手势冲突问题,滚动上顶部的问题就滚动不了了。请问题怎么解决
懒加载的方式去创建:
-(FSSegmentTitleView *)titleView{
if (!_titleView) {
_titleView = [[FSSegmentTitleView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 40) titles:@[@"相册",@"动态",@"评价"] delegate:self indicatorType:FSIndicatorTypeDefault];
_titleView.indicatorColor = ZF_HOME_NORMAL_BG;
_titleView.titleSelectColor = ZF_HOME_NORMAL_BG;
_titleView.backgroundColor = ZF_GLOBL_BG;
}
return _titleView;
}
//显示的时候要这样效果更好的,不然每次都是默认点击了第一个按钮了,后面的数据都乱了,懒加载就ok了不会每次都去选择第一个
当顶部的分类顶住后,再往上推,松手后mainTableView 的这个scrollViewDidScroll无限执行,致使卡顿,左右滑动后才能停止,
如题
如果scrollView执行这个代理:scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate,而不走scrollViewDidEndDecelerating:(UIScrollView *)scrollView这个代理,就会有问题,FSContenViewDidEndDecelerating:(FSPageContentView *)contentView startIndex:(NSInteger)startIndex endIndex:(NSInteger)endIndex这个代理就不会执行了
每次稍微滑动,vc的titile就会显示滑动方向的,但是我并没有滑动到对应的界面,这个问题怎么破?
FSPageContentView 中 parentVC 导致循环引用
提不了新分分支 也提不了pr。。。。
FSSegmentTitleView.m
第202行 成员变量尚未赋值
应将208行提上来
在vc数量和titleView数量不一致时(vc数量小于title数量)点击title 崩溃
进入不了dealloc方法
整体效果都不错。
但是有一个问题,就是滚动指示条会在滑下来的时候忽然闪现一下。我觉得实现思路和拉勾网app的“公司主页”类似,但是他似乎解决了这个问题。
解决办法是:
把FSPageContentView.m一个属性改成如下
@Property (nonatomic, weak) UIViewController *parentVC;//父视图
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.