在portaint Actionsheet中,在标签栏中显示。在风景中-在窗口中。我注意不要在旋转之前从选项卡中删除UIActionSheet,因为在wondow中旋转显示之后。
内部– willRotateToInterfaceOrientation:duration
关闭操作表不起作用。
最佳答案
您可以为此使用NSNotification。在您的viewdidload文件中添加此通知程序,当方向更改时,您将收到通知:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(OrientationChanged:)
name:@"UIDeviceOrientationDidChangeNotification"
object:nil];
…添加此方法:
-(void)OrientationChanged
{
}
参见NSNotification class reference。
关于iphone - 在设备旋转之前关闭UIActionSheet?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3967554/