-(IBAction)choosePictureButtonPressed
{
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"From Album",@"Camera",nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
actionSheet.cancelButtonIndex=2;
[actionSheet showInView:self.view];
[actionSheet showInView:[[UIApplication sharedApplication] keyWindow]];
[actionSheet release];
}
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex==0)
{
[self libraryAction];//:YES];
}
else if(buttonIndex == 1)
{
[self camAction];//:YES];
}
}
Tuesday, September 21, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment