Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo without AVCaptureDevice #1

Open
grgcombs opened this issue Jun 22, 2011 · 1 comment
Open

Demo without AVCaptureDevice #1

grgcombs opened this issue Jun 22, 2011 · 1 comment

Comments

@grgcombs
Copy link

Can we see a demo that doesn't use AVCaptureDevice? That class isn't available in the simulator.

@md347
Copy link

md347 commented Feb 3, 2012

Here is what i have done, hope it helps

  -(void)viewDidLoad{
        ExpandyButton *torchModeButton = [[[ExpandyButton alloc] initWithPoint:CGPointMake(0,0)
                                                                         title:@"Menu"
                                                                   buttonNames:[NSArray arrayWithObjects:@"Cancel", @"Done",nil]
                                                                  selectedItem:0] autorelease];
        [torchModeButton addTarget:self action:@selector(toggleFlashlight:) forControlEvents:UIControlEventValueChanged];
        [torchModeButton setHidden:NO];


        [[self view] addSubview:torchModeButton];
    }

- (void)toggleFlashlight:(id)sender {
int index=[(ExpandyButton *)sender selectedItem];
if (index==0) {
    [self performSelector:@selector(cancel)];
    }
if (index==1) {
    [self performSelector:@selector(done)];
     }
}

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

No branches or pull requests

2 participants