Giter VIP home page Giter VIP logo

Comments (5)

12207480 avatar 12207480 commented on August 22, 2024

第二个问题 这个方法 只会调用一次 可以和progress一起使用 - (void)pagerController:(TYTabPagerController *)pagerController transitionFromeCell:(UICollectionViewCell *)fromCell toCell:(UICollectionViewCell *)toCell animated:(BOOL)animated;
第一个问题 实现起来有点复杂 因为 点击不可能只点击左右两个页面 ,当点击其他页面的时候 如果用动画 会滚过很多页面到达那个页面 会很闪,所以我去掉了动画

from typagercontroller.

dev-gao avatar dev-gao commented on August 22, 2024

谢谢回答。
第二个问题,在你的demo中打印不难发现,的确是调用了多次。
第一个问题,哈哈,我刚好有这个需求,所以有此一问。我打算按下面的思路写了个测试:移除不需要显示的View,或者将其设置透明,scrollView里只留三个View的空间,当前显示的view在中间,切换新View时临时将新View移动到其左右,至于生命周期可以通过childController的add/remove去管理。

from typagercontroller.

dev-gao avatar dev-gao commented on August 22, 2024

第二个问题,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.

12207480 avatar 12207480 commented on August 22, 2024

每次到达这一页的时候都会调用

from typagercontroller.

12207480 avatar 12207480 commented on August 22, 2024

方法不一样 一个 animated:(BOOL)animated 一个 progress:(CGFloat)progress

from typagercontroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.