Coder Social home page Coder Social logo

super-scrollview's Introduction

SuperScrollView 针对CocosCreator cc.ScrollView做的优化

在线演示效果

Cocos论坛地址

CocosCreator2.x 旧版在这里

说明


整个列表数据的增减刷新都是在使用层去处理的,组件不需要知道你的数据结构是什么
无论你对你的数组做了什么样的操作(push,pop ....)
或者修改了某个元素的内容时,你只需要告诉组件你有多少条数据即可,
也就是 SuperLayout.total这个方法

接口

  • SuperLayout.total(length:number) 这个方法就是告诉组件你有多少条数据,每当你增加 删除 或者是你的数组长度没有变化 但是你数组的内容改变了 你都可以调用这个方法来刷新
  • SuperLayout.scrollToHeader 滚动到起始位置
  • SuperLayout.scrollToFooter 滚动到结束位置
  • SuperLayout.scrollToIndex 滚动到指定位置
  • 喜欢的话别忘记点个 Star 谢谢

撸码不易 手头宽裕打个赏 谢谢

super-scrollview's People

Contributors

icipiqkm avatar

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.