i have开发者_如何学Python 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];
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).
I use...
[aSheet showInView:appDelegate.window]
精彩评论