Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

first run issue #55

Open
nivbp7 opened this issue Dec 31, 2017 · 0 comments
Open

first run issue #55

nivbp7 opened this issue Dec 31, 2017 · 0 comments

Comments

@nivbp7
Copy link

nivbp7 commented Dec 31, 2017

Hi,
I'm trying to use the code, but can't seem to get it to run.

This is the code:

`
#import "ViewController.h"
#import "JPSVolumeButtonHandler.h"

@interface ViewController ()

@Property (nonatomic,strong) JPSVolumeButtonHandler *volumeButtonHandler;

@EnD

@implementation ViewController

  • (void)viewDidLoad {
    [super viewDidLoad];
    }

-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.volumeButtonHandler stopHandler];
[self.volumeButtonHandler startHandler:YES];
[NSTimer scheduledTimerWithTimeInterval:2.0
target:self
selector:@selector(takePhoto)
userInfo:nil
repeats:NO];

}

-(void)takePhoto{
NSLog(@"takePhoto");
self.volumeButtonHandler = [JPSVolumeButtonHandler volumeButtonHandlerWithUpBlock:^{
// Volume Up Button Pressed
NSLog(@"Volume Up Button Pressed");

} downBlock:^{
    // Volume Down Button Pressed
    NSLog(@"Volume Down Button Pressed");
    
}];

}
@EnD
`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant