Quote:
Originally Posted by baja_yu
|
okay, so I did this:
Code:
if ([captureDevice hasTorch] && [captureDevice hasFlash]) {
MainViewController *screen = [[MainViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:screen animated:YES];
[screen release];
}
else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No LED Light Supoorted" message:@"Your Device does not support the LED light." delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil];
[alert show];
[alert release];
}
But when I try on my iPhone 4S, it just gives me the alert. why is that happening?
I think the code is fine...
thanks