UIActionSheet showFromRect Autorotation

mkr*_*ral 6 ios ios5

我是UIActionSheet这样的:

-(void)accessoryPressed:(id)sender{
    //Omitted unnecessary objects

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:titleString delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@"Upload", nil];
    //actionSheet.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
    actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
    actionSheet.tag = ((UIButton*)sender).tag;
    [actionSheet showFromRect:[(UIButton*)sender frame] inView:[(UIButton*)sender superview] animated:YES];
}
Run Code Online (Sandbox Code Playgroud)

sender对象是一个UIButton嵌入在一个UITableViewCell的附件图.

问题是,当iPad旋转时,动作表没有调整大小(我不希望它实际调整大小但我希望它在正确的X,Y中)我尝试将AutoResizingMask设置为FlexibleLeft和FlexibleTop但它没有似乎改变了.

有没有人知道如何让actionSheet指向accessoryView自动旋转后?

这是它的样子:

在轮换之前 - 在轮换之前

轮换后 - 在此输入图像描述

rma*_*ddy 7

遗憾的UIKit是我们没有妥善处理这个问题.在我自己的应用程序中,我通过didRotateFromInterfaceOrientation:在视图控制器中实现该方法并使用视图的更新帧再次重新显示任何弹出窗口来处理此问题.