Strange problem in Action sheet when click the Cancel Button in iphone
Posted
by Pugal Devan
on Stack Overflow
See other posts from Stack Overflow
or by Pugal Devan
Published on 2010-06-09T14:51:36Z
Indexed on
2010/06/09
15:02 UTC
Read the original article
Hit count: 549
iphone
|uiactionsheet
Hi,
I have used action sheet in my view. Now i have faced one strange problem. If i clicked the cancel button, it dismissal the action sheet. But i clicked the cancel button, it works only Half part of the button(upper side only). Other part i clicked it doesnt work.
(Half portion of the button only works. Eg: actionsheet size 320X40. clicking works only 320X20. Other part doesnt work).
I have already used action sheet in many applcations. But i donno what i m doing wrong?. Please find me the problem where it is?
See my code is, I have declared also UIActionsheetDelegate in interface class.
- (void)viewDidLoad {
UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Share", @"") style:UIBarButtonItemStyleBordered target:self action:@selector(popupActionSheet)] autorelease];
self.navigationItem.rightBarButtonItem = addButton;
}
-(void)popupActionSheet {
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Share Post" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Email",@"Facebook",@"Twitter",nil];
popupQuery.actionSheetStyle = UIActionSheetStyleDefault;
[popupQuery showInView:self.view];
[popupQuery release];
}
Please help me out.
Thanks.
© Stack Overflow or respective owner