Comments (5)
第二个问题 这个方法 只会调用一次 可以和progress一起使用 - (void)pagerController:(TYTabPagerController *)pagerController transitionFromeCell:(UICollectionViewCell *)fromCell toCell:(UICollectionViewCell *)toCell animated:(BOOL)animated;
第一个问题 实现起来有点复杂 因为 点击不可能只点击左右两个页面 ,当点击其他页面的时候 如果用动画 会滚过很多页面到达那个页面 会很闪,所以我去掉了动画
from typagercontroller.
谢谢回答。
第二个问题,在你的demo中打印不难发现,的确是调用了多次。
第一个问题,哈哈,我刚好有这个需求,所以有此一问。我打算按下面的思路写了个测试:移除不需要显示的View,或者将其设置透明,scrollView里只留三个View的空间,当前显示的view在中间,切换新View时临时将新View移动到其左右,至于生命周期可以通过childController的add/remove去管理。
from typagercontroller.
第二个问题,TYTabPagerController中加入打印,手动滑动试试看
-
(void)transitionFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex progress:(CGFloat)progress
{
UICollectionViewCell *fromCell = [self cellForIndex:fromIndex];
UICollectionViewCell *toCell = [self cellForIndex:toIndex];NSLog(@"%ld",(long)toIndex);
if (_tabDelegateFlags.transitionFromeCellProgress) {
[self.delegate pagerController:self transitionFromeCell:fromCell toCell:toCell progress:progress];
}[self setUnderLineFrameWithfromIndex:fromIndex toIndex:toIndex progress:progress];
}
from typagercontroller.
每次到达这一页的时候都会调用
from typagercontroller.
方法不一样 一个 animated:(BOOL)animated 一个 progress:(CGFloat)progress
from typagercontroller.
Related Issues (20)
- 这个不好描述,不知道这样是否能理解
- 怎么设置标题不缩放? HOT 1
- 与父视图手势冲突 HOT 1
- 使用之后,隐藏导航栏,侧滑返回失效。请问有没有解决方案?
- void SendDelegateMessage(NSInvocation *): delegate (webView:willCloseFrame:) failed to return after waiting 10.000000 seconds. main run loop mode: kCFRunLoopDefaultMode HOT 1
- 可以设置页面样式为 顶部header + 标签导航(TYTabPagerBar) + controller 的效果吗? HOT 3
- Arabic Language Support
- 我如何设置默认选中的索引
- 字体大小缩放后,对应的label尺寸可以动态缩放吗?
- contentInset,adjustContentCellsCenter一起设置时必现不能居中的bug
- tabbar上没选中的标题会隐藏 HOT 1
- 设置选中字体没有完全显示出对应的大小,请问这块能优化吗?
- 会多次走到viewwilldisappear方法,解决方法↓
- 切换后台后回到前台,前面加载的vc全部会重载
- 页面从上到下依次是 header、tab、controller,所有controller共用一个header,就像美团商家页面那样的效果
- 点击TYTabPagerBar,没有效果
- 如何禁止手势滚动? HOT 1
- 列表横竖屏切换的问题
- 选中字体问题
- progressHeight覆盖问题
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 typagercontroller.