You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
Hi there jpsim
While searching the Internet for a volume button handler I stumbled upon your code here.
I really need your code and tried to run it in Xcode but during simulation I get the following message:
I have to admit that I really do not know objective c but I was pretty sure that I did everything you've said.I've added the frameworks in my settings,too
[self.volumeButtonHandler stopHandler]; // just to make sure but also tried without this line
[self.volumeButtonHandler startHandler:YES];
}
(void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
(IBAction)showMessage //click button to see if it works then it should listen for button press
{
NSLog(@"Something");
self.volumeButtonHandler = [JPSVolumeButtonHandler volumeButtonHandlerWithUpBlock:^{
// Volume Up Button Pressed
NSLog(@"Volume Up Button Pressed");
} downBlock:^{
// Volume Down Button Pressed
NSLog(@"Volume Down Button Pressed");
}];}
your code is very crucial for me. I've already implemented this feature for my android app version but I'm struggling with iOS. All other objective c codes on the internet are outdated. they worked until iOS 7.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hi there jpsim
While searching the Internet for a volume button handler I stumbled upon your code here.
I really need your code and tried to run it in Xcode but during simulation I get the following message:
2018-04-01 11:11:11.082845-0700 Buttons[11228:255620] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContext
2018-04-01 11:11:11.087537-0700 Buttons[11228:255620] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext createOutputContextWithUniqueIdentifier:]
I have to admit that I really do not know objective c but I was pretty sure that I did everything you've said.I've added the frameworks in my settings,too
#import "helloViewController.h"
#import <AVFoundation/AVFoundation.h>
#import <MediaPlayer/MediaPlayer.h>
#import "SystemVolumeView.h"
#import "JPSVolumeButtonHandler.h" //here importer
@interface helloViewController ()
@Property (nonatomic,strong) JPSVolumeButtonHandler *volumeButtonHandler;// declared
@EnD
@implementation helloViewController
(void)viewDidLoad {
[super viewDidLoad];
[self.volumeButtonHandler stopHandler]; // just to make sure but also tried without this line
[self.volumeButtonHandler startHandler:YES];
}
(void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
(IBAction)showMessage //click button to see if it works then it should listen for button press
{
NSLog(@"Something");
self.volumeButtonHandler = [JPSVolumeButtonHandler volumeButtonHandlerWithUpBlock:^{
// Volume Up Button Pressed
NSLog(@"Volume Up Button Pressed");
} downBlock:^{
// Volume Down Button Pressed
NSLog(@"Volume Down Button Pressed");
}];}
your code is very crucial for me. I've already implemented this feature for my android app version but I'm struggling with iOS. All other objective c codes on the internet are outdated. they worked until iOS 7.
Thanks in advance.
The text was updated successfully, but these errors were encountered: