I have a UIActionSheet
with 4 buttons inside. The strange is that the last two buttons aren't separated by line like the others.
Probably I'm forgetting to set some property on action sheet ? Or it's a bug ?
Thanks.
I have a UIActionSheet
with 4 buttons inside. The strange is that the last two buttons aren't separated by line like the others.
Probably I'm forgetting to set some property on action sheet ? Or it's a bug ?
Thanks.
The cancel Button is supposed to show at the last row. That is why there is no Line
You need to tell your UIActionSheet
which button index is for destructive action. To do that you can either create your destructive button as following:
sheet.destructiveButtonIndex = [sheet addButtonWithTitle:@"Annulla"];
Or if you want to set it after it has been created, you can do something like this:
sheet.destructiveButtonIndex = 0;
Where zero is the actual index of your destructive button.