Pregunta

I have a UIActionSheet which appears as a UIPopoverController on the iPad. I am trying to show it from a UIButton by using:

[self.exampleActionSheet showFromRect:self.exampleButton.frame inView:self.view animated:YES];

What I am trying to do now is to reposition this UIActionSheet on orientation change. But when I use the above code to reposition after the screen has rotated, it doesn't do so. Can anyone tell me how to do this properly?

¿Fue útil?

Solución

A better workflow would be:

  1. Dismiss actionsheet when a rotation occurs
  2. Calculate the new rectangle where it should be presented from
  3. Present a new actionsheet from the new rectangle
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top