Advertisement
princetechn0

Untitled

Feb 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #import "control.h"
  2. #import <QuartzCore/QuartzCore.h>
  3.  
  4. %hook SBVolumeHardwareButtonActions
  5.  
  6. CFTimeInterval startTime = CACurrentMediaTime();
  7.  
  8. -(void)volumeIncreasePressDown
  9. {
  10.  
  11. }
  12. CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime;
  13.  
  14.  
  15. -(void)volumeIncreasePressUp {
  16.  
  17.  
  18. if(elapsedTime >= 1) {
  19.  
  20.  
  21. [[%c(SBMediaController) sharedInstance] changeTrack: 1];
  22.  
  23.  
  24. } else {
  25.  
  26.  
  27. }
  28. }
  29.  
  30.  
  31.  
  32. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement