Giter Club home page Giter Club logo

jkmovinglabelsview's Introduction

JKMovingLabelsView

A collectionview which can show scroll labels, and the labels' text are attributed. It's simple but useful.

思路: 计时器使用的gcd的,如果需要调整速度,就增加或者减小每次每次向右移动的幅度吧。 默认好像一次向右移动+1px的偏移量,等移动到contentSize.width的时候,就直接重置到初始位置,实现轮播。 主要内容右边的空白需要计算出正确的长度,然后和从0到第n的元素的长度之和对比,如果正好能够填充,就不再循环添加。 关于展示文本的数组,因为感觉富文本包含plain样式,就强制必须传入富文本的数组。 点击回调用了block实现。 (完) · · · · one more thing,版权没有,盗版不究,欢迎fork&star,任意交流。

jkmovinglabelsview's People

Contributors

jksniper 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.