Demo效果:
使用规则:
#import "MMWaveView.h"
MMWaveView *view = [[MMWaveView alloc] initWithFrame:self.view.bounds];
view.delegate = self;
[self.view addSubview:view];
#pragma mark - MMWaveViewDelegate
- (void)waveViewTriggerAction:(MMWaveView *)waveView{
NSLog(@"respond to event action");
}
当原有工程的某个视图想有这个功能只需要继承MMWaveView
即可。
事件响应:
当手指离开屏幕,整个箭头出现在屏幕则会触发事件响应回调
更多了解您可以点击Demo。