UIActionSheet cancel button strange behaviour

Posted by nevan on Stack Overflow See other posts from Stack Overflow or by nevan
Published on 2009-07-29T02:11:34Z Indexed on 2010/04/30 7:27 UTC
Read the original article Hit count: 281

Filed under:
|
|

I have a UIBarButtonItem opening an action sheet to offer users choices about what to do. Everything works as expected unless I try to click on the "Cancel" button. The target of the button appears to have moved up from where it should be. I can only activate it by clicking somewhere in the middle of the "Cancel" and "Ok" buttons.

alt text

I've tried at action sheets in other applications and they work fine, so it's not just my big thumb. The action sheet is opening in a UIViewController

- (void)showOpenOptions
{
UIActionSheet *sheet = [[UIActionSheet alloc] 
	initWithTitle:NSLocalizedString(@"Open link in external application?", @"Open in external application")
	delegate:self
	cancelButtonTitle:NSLocalizedString(@"Cancel", @"Cancel")
	destructiveButtonTitle:NSLocalizedString(@"Open Link", @"Open Link")
	otherButtonTitles:nil];

[sheet showInView:self.view];
[sheet release];
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch