【发布时间】:2012-12-19 15:20:08
【问题描述】:
我有代码
-(BOOL) shouldAutorotate
{
return YES;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willAnimateRotationToInterfaceOrientation: toInterfaceOrientation duration: duration];
deviceOrientation = toInterfaceOrientation;
if(deviceOrientation == UIInterfaceOrientationPortrait)
{
curPageSize = CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-STATUS_BAR_HEIGHT);
}
else if(deviceOrientation == UIInterfaceOrientationLandscapeLeft || deviceOrientation == UIInterfaceOrientationLandscapeRight)
{
curPageSize = CGSizeMake([UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width-STATUS_BAR_HEIGHT);
}
[self correctViews:curPageSize];
}
这些方法在 ModalViewController 中定义... 当我旋转设备时,程序不响应 willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration...
我该怎么办?!
【问题讨论】:
标签: ios6