Advertisement
princetechn0

Untitled

Feb 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #import "control.h"
  2.  
  3.  
  4.  
  5. %hook SBVolumeHardwareButtonActions
  6.  
  7. NSDate *start = [NSDate date];
  8. static BOOL active = NO;
  9.  
  10. -(void)volumeIncreasePressDown {
  11.  
  12.  
  13. if (active == NO) {
  14. active = YES;
  15.  
  16.  
  17. } else {
  18.  
  19. active = NO;
  20.  
  21.  
  22. }
  23. }
  24.  
  25. -(void)volumeIncreasePressUp {
  26.  
  27. if(active == NO) {
  28. [[%c(SBMediaController) sharedInstance] changeTrack: 1];
  29. }
  30. }
  31.  
  32. NSTimeInterval timeInterval = [start timeIntervalSinceNow];
  33.  
  34. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement