ios - how to create player sound UISlider to be UIProgress -
i want 1 application play sound file , show in uiprogress when play music. have use uislider instead uiprogress (for example want can further sound or rewind uislider music player in iphone)
i create 1 application play music uiprogress want further or rewind music touch , push.
please guide me , tell me it.
- (void)viewdidload { [super viewdidload]; durationcontrol= [[uislider alloc]initwithframe:cgrectmake(65, 250 , 130, 10)]; // durationcontrol.maximumvalue = 130; [durationcontrol addtarget:self action:@selector(changeduration) forcontrolevents:uicontroleventvaluechanged]; [durationcontrol setthumbimage:[self imagenamed:@"trackbutton"] forstate:uicontrolstatenormal]; [durationcontrol setthumbimage:[self imagenamed:@"trackbutton1"] forstate:uicontrolstatehighlighted]; [self.view addsubview:durationcontrol]; } -(void)ffwaudio{ [player changeduration:durationcontrol.value+=5]; durationcontrol.value = player.currenttime; } -(void)bwaudio{ if (durationcontrol.value>=5) { [player changeduration:durationcontrol.value-=5]; durationcontrol.value = player.currenttime; } -(void)changeduration:(double)value{ player.currenttime = value; durationcontrol.value = player.currenttime; }
Comments
Post a Comment