0

I am using a segmented control as my navigation. One of the buttons in my segmented control is a "share" button; when clicked, want to display an actionsheet from the segmented control, with the arrow pointing up, towards the segmented control bar.

This is not placing the actionsheet popover correctly. Actionsheet Arrow not facing up, it's facing down.

Thanks for helping!

 CGRect screenRect = [[UIScreen mainScreen] bounds];

 CGFloat screenWidth = screenRect.size.width;
 CGFloat screenHeight = screenRect.size.height;

 [self.actionSheet  showFromRect:CGRectMake(190,220,screenWidth,screenHeight) inView:self.view animated:YES];
Slinky
  • 5,662
  • 14
  • 76
  • 130

2 Answers2

0

A UIActionSheet presented on the iPad is presented in the middle of the screen and with no arrow. You question is unclear.

I believe you are (or should) actually using a UIPopoverController for that purpose. Can you complete your code example?

pierrephi
  • 101
  • 1
  • 6
  • Thanks. The arrow does show on iPad actionsheet dialogs. The solution was found here: http://stackoverflow.com/questions/3763324/uiactionsheet-change-arrow-position – Slinky Sep 10 '12 at 13:37
  • The documentation for the -showFromRect:inView: method states this: On iPad, this method displays the action sheet in a popover whose arrow points to the specified rectangle of the view – Slinky Sep 10 '12 at 13:44
0

The solution, albeit hacky, for this issue was derived from messing with the parameters in

-(void)showFromRect:(CGRect)rect inView (UIView *)view animated:(BOOL)animated 

and by the following SO post:

UIActionSheet Change arrow position?

Community
  • 1
  • 1
Slinky
  • 5,662
  • 14
  • 76
  • 130