Waver 是类似 Siri 的波纹曲线。
示例:
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];