Strange problem in Action sheet when click the Cancel Button in iphone
- by Pugal Devan
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.