iOS实现类Siri曲线:Waver

Waver   2015-08-18 19:45:10 发布
您的评价:
     
0.0
收藏     0收藏
文件夹
标签
(多个标签用逗号分隔)

Waver 是类似 Siri 的波纹曲线。

Requirements

Waver works on iOS 7.0 and later version and is compatible with ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework
  • UIKit.framework
  • CoreGraphics.framework
  • QuartzCore.framework

You will need LLVM 3.0 or later in order to build Waver.

Usage

Cocoapods

CocoaPods is the recommended way to add Waver to your project.

  1. Add a pod entry for Waver to your Podfilepod 'Waver', '~> 0.2.0'
  2. Install the pod(s) by runningpod install.
  3. Include Waver wherever you need it with#import "Waver.h".

Or Copy the Waver folder to your project

Example

Waver * waver = [[Waver alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.view.bounds)/2.0 - 50.0, CGRectGetWidth(self.view.bounds), 100.0)];

__weak Waver * weakWaver = waver;
waver.waverLevelCallback = ^() {

    [self.recorder updateMeters];

    CGFloat normalizedValue = pow (10, [self.recorder averagePowerForChannel:0] / 50);

    weakWaver.level = normalizedValue;

};
[self.view addSubview:waver];

项目主页:http://www.open-open.com/lib/view/home/1439898119989

扩展阅读

下拉刷新过渡动画Android版实现:WaveRefreshForAndroid
一个iOS开发者对tvOS SDK的初探
iOS7中容易被忽视的新特性
[iOS] 魔法数字 “3”
HomeKit 开发指南(中文版)

为您推荐

DOM 模板引擎:Teddy
FireQuery - 用于jQuery开发的Firebug扩展
CSS 实现的演示框架:Decss.js
jquery实现网站向导提示操作插件
轻量级响应式 CSS 框架:StringBean

更多

Waver
iOS开发
相关文档  — 更多
相关经验  — 更多
相关讨论  — 更多