Coder Social home page Coder Social logo

sxwaveanimate's Introduction

SXWaveAnimate

##实现非常美观的灌水动画

image

####6月2日升级版本(建议更新下) 将动画代码封装到了Cell的内部,提供了统一的接口及赋值方法

使用方法

1.将代码中的classes文件夹拖入项目中,里面包含了自定义Cell,及一个便利计算frame的类
2.在需要用到的类中(就是你要写tableView数据源方法和代理方法的类)引入头文件
#import "SXWaveCell.h"
3.在数据源方法的cellforRow中在你需要的位置,把以往的UITableView Cell *cell 等等换成
SXWaveCell *cell = [SXWaveCell cell];
self.waveCell = cell;
[cell setPrecent:self.precent textColor:[UIColor orangeColor] type:0 alpha:1];
return cell;
4.其中第三行的这个 setPrecent: textColor: type: alpha:方法 是一个赋值方法,现在必须四个参数都传,后续会设置多个接口 可以只传需要的值。
5.现在源码里有两种方法一个是在页面显示之后点击cell触发动画,一个是一进去就显示动画,如果想要这么设置 需要在viewDidAppear方法中加入一行开始动画的方法[self.waveCell addAnimateWithType:0];

具体代码在示例程序中写的都很清晰非常易上手


####初始版本 因为前期主要以实现功能为主,暂时接口封装的还不是很完善,很快会不断完善。并且现在的代码结构也非常清晰了完全可以复用 欢迎关注。

暂时提供三种样式。

第一种是,纯白背景橙色文字。
第二种是,半透明背景深绿文字。 后续会提供颜色的接口。
第三种是,颜色纯白,背景较深,相比于前两种,第三种是先把水位灌满再降到指定的高度。

也可以根据使用者喜好自行修改

sxwaveanimate's People

Contributors

dsxniubility avatar

Watchers

James Cloos avatar  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.