views:

33

answers:

2

i have a uiactionsheet and the buttom button doesnt work correctly the first time i press it, or the second, but only numerous times after trying. I tried removing the cancel button at the bottom and leaving a button title however none of these steps solved the problem. This is the code i am using:

UIActionSheet *aSheet = [[UIActionSheet alloc]
                         initWithTitle:nil 
                         delegate:self 
                         cancelButtonTitle:nil 
                         destructiveButtonTitle: @"Close"
                         otherButtonTitles:@"6940313388", @"2", @"3", @"4", nil];
+1  A: 

I've found that if you present the action sheet from the wrong view, whatever bottom bar may exist in your view will block the user interaction of the action sheet but not visually obscure it.

Experiment with calling showFromToolbar:, showFromTabBar: and showInView: to see which works properly (I can't remember at the moment).

Frank Schmitt
i have a tab bar so i used that method and it worked thanks
Alx
A: 

I use...

[aSheet showInView:appDelegate.window]
JWD