Latest | 0.0.1 |
---|---|
Homepage | https://github.com/KBvsMJ/EBTWaterWaveDemo |
License | MIT |
Platforms | ios 8.0, requires ARC |
Authors |
用UIView或者两张切图来根据设置对应水位值来实现水波动画,支持纯代码、Xib、SB
可以通过设置对应的参数来控制水波动画是否一直执行。
使用pod指令添加类库文件到项目中
pod 'EBTWaterWaveView'
用UIView实现水波动画操作过程
首先:#import "EBTWaterWaveView.h" 类文件
然后:
纯代码使用示例:
1:先创建水波动画view并添加self.view上面。
waveView = [[EBTWaterWaveView alloc]initWithFrame:CGRectMake(0, 80, SCREEN_WIDTH, SCREEN_HEIGHT)];
[self.view addSubview:waveView];
2:调用其方法
[self.waveView showWaterWaveViewWithDepath:0.87 withWaveFillColor:[[UIColor redColor] colorWithAlphaComponent:0.5] withWaveStillAnimate:YES withWaterWaveCompleteHandler:^(EBTWaterWaveView waterWaveView, UIBezierPath bezierPath) {
}];
Xib或者SB示例
1:先在控制器上面拖一个view并将其class设置为“EBTWaterWaveView”,并托线条引出去。
2: 调用其方法
[self.waterWaveView showWaterWaveViewWithDepath:0.87 withWaveFillColor:[[UIColor redColor] colorWithAlphaComponent:0.5] withWaveStillAnimate:YES withWaterWaveCompleteHandler:^(EBTWaterWaveView waterWaveView, UIBezierPath bezierPath) {
}];
效果演示图
用两张切图实现水波动画操作过程
首先: #import "EBTWaterImageWaveView.h" 类文件
然后:
纯代码使用示例:
1:先创建水波动画view并添加self.view上面。
customWaveView = [[EBTWaterImageWaveView alloc]initWithFrame:CGRectMake(120, 120, 105, 105)];
[self.view addSubview:customWaveView];
2:调用其方法
[customWaveView showWaterImageWaveViewWithDepath:0.47 withWaveBackGroundImage:[UIImage imageNamed:@"wave"] withWaveFillImage:[UIImage imageNamed:@"wavegreen"] withWaveStillAnimate:YES withWaveImageViewCompleteHandler:^(EBTWaterImageWaveView *waveImageView) {
}];
Xib或者SB示例
1:先在控制器上面拖一个view并将其class设置为“EBTWaterImageWaveView”,并托线条引出去。
2: 调用其方法
[self.waterImageView showWaterImageWaveViewWithDepath:0.47 withWaveBackGroundImage:[UIImage imageNamed:@"wave"] withWaveFillImage:[UIImage imageNamed:@"wavegreen"] withWaveStillAnimate:YES withWaveImageViewCompleteHandler:^(EBTWaterImageWaveView *waveImageView) {
}];
效果演示图
Latest podspec
{ "name": "EBTWaterWaveView", "version": "0.0.1", "summary": "Two cut to map according to set the corresponding water level to achieve the water wave animation", "description": "Two slices to map according to the corresponding set of water level values u200bu200bto achieve the water wave support xib sb pure code", "homepage": "https://github.com/KBvsMJ/EBTWaterWaveDemo", "license": "MIT", "authors": { "KBvsMJ": "[email protected]" }, "platforms": { "ios": "8.0" }, "requires_arc": true, "source": { "git": "https://github.com/KBvsMJ/EBTWaterWaveDemo.git", "tag": "0.0.1" }, "source_files": "EBTWaterWaveView/*.{h,m}", "exclude_files": "Classes/Exclude" }
Thu, 16 Feb 2017 14:40:04 +0000