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

first run issue #55

@nivbp7

Description

@nivbp7

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
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions