Show UIActionSheet

Submitted by:Tim Kelly

Date added:15 June, 2011

Category:iPhone

This code will show IPhone UIActionSheet

Tags: action sheet

Code Snippet:

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{

//SMS

if(buttonIndex == 0){

}

//EMAIL

if (buttonIndex == 1){

}

else

{

}

}

-(IBAction)emailAction{

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Send by" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"SMS", @"Email",nil];

actionSheet.actionSheetStyle = UIActionSheetStyleDefault;

[actionSheet showInView:self.view];

[actionSheet release];

}
 
 

Comments