Giter VIP home page Giter VIP logo

waver's Introduction

#Waver

Build Status

A Siri like wave effect

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 Podfile pod 'Waver', '~> 0.2.0'
  2. Install the pod(s) by running pod 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];

License

This code is distributed under the terms and conditions of the MIT license.

SpecialThanks

https://github.com/stefanceriu/SCSiriWaveformView

waver's People

Contributors

kevinzhow avatar maximbilan avatar ryanli-me avatar

Stargazers

CaiGou avatar fennuxiong avatar  avatar Akai Omoi avatar  avatar Ved Nig avatar L-Jay avatar  avatar UU avatar  avatar  avatar lyhWork avatar  avatar  avatar shierdd avatar  avatar 大叔 avatar li.ding avatar fyzt avatar hhhaiai avatar YXY avatar 生‘ avatar 007 avatar 柚子 avatar 隐身人 avatar Meak Tsui avatar  avatar Just Fly avatar  avatar  avatar plusend avatar Fun avatar  avatar 洪陪 avatar Bogon avatar  avatar bin avatar iBBer Pro avatar  avatar Fizzzz avatar Joe avatar  avatar  avatar  avatar HanJunqiang avatar gezihuzi avatar Jian Jin avatar  avatar 泰坦虾米 avatar  avatar Leo Lee avatar vulcangz avatar 李赛 avatar  avatar StefanQing avatar CodeLee avatar rain1988 avatar  avatar  avatar JuiceLv avatar  avatar  avatar Ankhetsin avatar  avatar WorkerAmo avatar Jesse avatar  avatar  avatar  avatar  avatar Zorro avatar Jiraiya avatar  avatar johnxguo avatar Liang Yi avatar Ming avatar CrazyMax avatar  avatar INSTANT.CJ avatar Çağrı ÇOLAK avatar DevGuan avatar V!ctor avatar  avatar huasali avatar lawrencew avatar NSLegend avatar Lofter avatar cxl avatar  avatar 咖啡豆 avatar  avatar  avatar 林中鸟 avatar  avatar zhou xingfa avatar Yan avatar Jayne avatar  avatar zack avatar  avatar

Watchers

 avatar inmyfree avatar  avatar  avatar Bin Wei avatar Tamil avatar 煎饼果子 avatar xlliang avatar  avatar  avatar Ren  Yu avatar  avatar Jusive avatar Jerry avatar caipeng avatar  avatar  avatar MetaSky avatar tysun avatar  avatar  avatar

waver's Issues

New version via Cocoapods

Hi, I stumbled upon this amazing library some days ago and have enjoyed it a lot. I found that the 0.3.0 version on Cocoapods is outdated and would love to help releasing a newer version!

dealloc still not execute

I fix like this:waver add a methon named stop to execute dealloc, when recorder stop then invoke stop.

waver.waverLevelCallback 出现循环引用,没法解决 请问是什么问题。orz

__weak typeof(Waver) * weakWaver =waver;
__block double voiceSound = 0;
__weak typeof(EaseMob) *easeMob = [EaseMob sharedInstance];
waver.waverLevelCallback = ^() {

        //        [self.recorder updateMeters];

        voiceSound = [easeMob.deviceManager peekRecorderVoiceMeter];

        //            CGFloat normalizedValue = pow (10, voiceSound / 40);
        if (voiceSound>0.45) {
            voiceSound = 0.45;

        }

        weakWaver.level = voiceSound;
       NSLog(@"%lf",weakWaver.level);
    };

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.