I am using the code:
{ randomstatus=0; msg=[[NSString alloc]initWithFormat:@"Good job, do you want to continue?"]; UIActionSheet *actionSheet=[[UIActionSheet alloc]initWithTitle:msg delegate:self cancelButtonTitle:@"No" destructiveButtonTitle:@"Yes" otherButtonTitles:nil]; [actionSheet showInView:self.view]; [actionSheet release]; [msg release]; }
I do not want to change the code, but I need the "destructiveButton" to be green, not red. Is this possible, or do I need to use another button?
Unfortunately, there are no official ways to customize the UIActionSheet buttons.
However, you can access the UIActionSheet subzones (which may break in a future iPhone iPhone update) or add a new view with a button that spans the original destructive button (it may break again).
UIActionSheet, : iPhone UIActionSheet UIActionSheet.
"" . , , , Apple UIActionSheet. , App Store.
, - , .. UIActionSheet ( ). , , , , , .
. , , , UIActionSheet . -. , .
, , UIActionSheet, , UIActionSHeetDelegate. , , UIActionSheet