Coder Social home page Coder Social logo

Comments (4)

HarrisonXi avatar HarrisonXi commented on May 2, 2024

这个方法应该被归类为不推荐使用的将废弃方法,这是我们在业务中为了实现首次进入
TangramFlowLayout 时进行一次状态请求的后门,后期维护时可能会从开源版本中移除。

如果您想了解具体的细节的话:

  1. 这里并不是用来刷新页面的(比如我们是触发一次定位请求)
  2. 网络请求应该在代码里去掉重复请求,只执行一次

from tangram-ios.

Feeeeeerny avatar Feeeeeerny commented on May 2, 2024

安卓版本也有这几个字段,我理解他的作用是,异步请求卡片的内容数据。这个功能应该不会去除吧?

from tangram-ios.

HarrisonXi avatar HarrisonXi commented on May 2, 2024

异步加载数据一方面来说比较倾向于业务逻辑,而不是底层框架特性。框架可以在合适的时机抛出 didEnter / didLoaded 等事件供业务层来进行对应功能扩展。

另一方面至少从设计角度来说,不太应该在 calculateLayout 方法中进行数据请求的 Bus 事件发送。

from tangram-ios.

Feeeeeerny avatar Feeeeeerny commented on May 2, 2024

好的,我这里参照安卓,在Tangram的scrollViewDidScroll方法中遍历了visibel layouts,对设置了loadApi的layout发出了asyncload的event,由业务方处理该event。

from tangram-ios.

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.