| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // SuperPlayerSoundEffectPitchView.m
- // BuguLive
- //
- // Created by 岳克奎 on 16/12/19.
- // Copyright © 2016年 xfg. All rights reserved.
- //
- #import "SuperPlayerSoundEffectPitchView.h"
- @implementation SuperPlayerSoundEffectPitchView
- - (instancetype)initWithCoder:(NSCoder *)aDecoder
- {
- if (self = [super initWithCoder:aDecoder])
- {
- //因没实力化,子控件要在from nib 写
- }
- return self;
- }
- - (void)awakeFromNib
- {
- [super awakeFromNib];
- }
- #pragma mark - 音调调节
- - (IBAction)pitchValueChangeBtnClick:(UIButton *)sender
- {
- if(sender.tag == 0)
- {
- if ( self.pitchInt <12)
- {
- self.pitchInt = self.pitchInt +1;
- }
- }
-
- if(sender.tag == 1)
- {
- if (self.pitchInt>-12)
- {
- self.pitchInt = self.pitchInt -1;
- }
- }
- self.pitchValueShowLab.text = [NSString stringWithFormat:@"%ld",(long)self.pitchInt];
-
- if (self.delegate&&[self.delegate respondsToSelector:@selector(changeSoundEffectOfPitchValue:)])
- {
- [self.delegate changeSoundEffectOfPitchValue:self.pitchInt];
- }
- }
- - (void)setPitchInt:(NSInteger)pitchInt
- {
- _pitchInt = pitchInt;
- _pitchValueShowLab.text = [NSString stringWithFormat:@"%ld",(long)_pitchInt];
- //处理默认数据
- if (_delegate&&[_delegate respondsToSelector:@selector(changeSoundEffectOfPitchValue:)])
- {
- [_delegate changeSoundEffectOfPitchValue:_pitchInt];
- }
- }
- @end
|