Code Monkey home page Code Monkey logo

uisuperscrollview's Introduction

UISuperScrollView 针对CocosCreator cc.ScrollView做的优化

在线演示效果

Cocos论坛地址

说明


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

接口

  • UISuperLayout.total(length:number) 这个方法就是告诉组件你有多少条数据,每当你增加 删除 或者是你的数组长度没有变化 但是你数组的内容改变了 你都可以调用这个方法来刷新
  • UISuperLayout.scrollToHeader 滚动到起始位置
  • UISuperLayout.scrollToFooter 滚动到结束位置
  • UISuperLayout.resetScrollView 重置列表 当列表滑动到底部时 然后不管通过什么方式(同步|异步)减少了整体的(尺寸|缩放) 时保证内容显示正确
  • 喜欢的话别忘记点个 Star 谢谢

uisuperscrollview's People

Contributors

icipiqkm avatar

Watchers

 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.