Giter VIP home page Giter VIP logo

Comments (6)

bigtreenono avatar bigtreenono commented on July 21, 2024

您好, 请问下这个问题您有解决吗

from yzdisplayviewcontroller.

meilulu avatar meilulu commented on July 21, 2024

你只要初始化就会执行Controller的声明周期,比如你初始化一个实例添加到第4个tabbar上。虽然你没点第4个Tabbar,但是它的ViewDidLoad还是走了。 这是有问题的

from yzdisplayviewcontroller.

sulizhan avatar sulizhan commented on July 21, 2024

发现滑动的时候会提前走下一个viewdidload 的方法。 比如说 频道1 频道2 频道3 从1滑到2 应该只调用2的viewdidload 但是发现会提前调用 3的viewdidload

from yzdisplayviewcontroller.

Z-Kevin avatar Z-Kevin commented on July 21, 2024

@meilulu viewdidload 提前走的问题你解决了吗

from yzdisplayviewcontroller.

sclcoder avatar sclcoder commented on July 21, 2024

最重要的就是要保证生命周期调用的正确性,不然使用起来会出现很多问题。这是个严重的问题。

from yzdisplayviewcontroller.

nahuo avatar nahuo commented on July 21, 2024

问题出现的原因是YZDisplayViewController中用到的contentScrollView属性是一个系统属性(谁发现的?为什么是个系统属性?用来干啥的?素质三问,希望有大神指教).
但是当你修改contentScrollView为别的属性,调用 setUpTitleEffect:设置了*titleWidth的时候,你会发现第一vc的titlelabel莫名其妙的不显示了.原因是因为添加第一个label的时候titleScrollView并没有初始化,解决办法是在YZDisplayViewController的setUpAllTitle方法中,将[_titleScrollView addSubview:label]改为[self.titleScrollView addSubview:label]即可解决问题
之所以作者没有发现这个问题,感觉是因为系统contentScrollView的setter方法会被调用很多次,而在此方法中作者对titleScrollView进行了self.titleScrollView的初始化

from yzdisplayviewcontroller.

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.