Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Place Cancel button in UIActionSheet at the bottom

In UIActionSheet i have a uitableview and cancel button. By default cancel button appears at the top. I want to make it appear at the bottom after tableview. How do i do that?

like image 791
Arun Avatar asked Apr 22 '13 06:04

Arun


1 Answers

it is work for me:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"SomeTitle" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil, nil];
[actionSheet addButtonWithTitle:@"Some Action"];        
[actionSheet addButtonWithTitle:@"Cancel"];
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons -1;
like image 190
Alexander Merchi Avatar answered Oct 17 '22 00:10

Alexander Merchi