Hello,
I'm using a UIActionSheet to let users to choose either a camera or photo library, how ever if a user has an iPod he shouldn't be presented with camera option, so i want to know how to do a conditional inside an action sheet, thank you.
here is my code:
I'm using a UIActionSheet to let users to choose either a camera or photo library, how ever if a user has an iPod he shouldn't be presented with camera option, so i want to know how to do a conditional inside an action sheet, thank you.
here is my code:
Code:
-(IBAction)selector {
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:@"Choose Source Type?"
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:@"Select From Library", @"Capture From Camera", nil];
[actionSheet showInView:self.view];
[actionSheet release];
}
Code:
if ( (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]))
{
}