Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obj-C, why is my UIActionSheet Cancel button hard to tap?

I've noticed in my app that my cancel button is hard to tap, it seem like the hit area is not in the center.

How do I fix this ?

Heres my code...

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"" 
  delegate:dg 
  cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil
  otherButtonTitles: @"Help Pages", @"Tutorial", 
  @"Feedback / Questions ", @"Facebook Group", @"About", nil];

actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheet setTag:CommonUIActionSheetHelp];
[actionSheet showInView:vw];
[actionSheet release];
like image 275
Jules Avatar asked Dec 21 '22 15:12

Jules


1 Answers

I think your problem lies in the [actionSheet showInView:vw];, perhaps you are using tabBarController/toolBar in you application(at bottom), this error occurs at that time.

you should use either showFromToolbar or showFromTabBar as per your design. If your design is different then please mention it.(if no tabBar/toolBar there).

Thanks

like image 173
Ravin Avatar answered Jan 27 '23 18:01

Ravin