【发布时间】:2012-12-17 01:35:20
【问题描述】:
伙计们!
需要一些紧急的见解。 我的问题是,即使 iPhone 4/4S 和 iPod 4 上的测试在此处使用以下代码正常旋转:
- (void)initNotifications
{
[[NSNotificationCenter defaultCenter] postNotificationName:@"setFreeOrientation" object:nil];
[[UIDevice currentDevice]beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter]addObserver:self
selector:@selector(didRotate:)
name:UIDeviceOrientationDidChangeNotification
object:Nil];
}
-(void)didRotate:(NSNotification*)notification
{
[super rotateTopBars];
[super rotateOptionsBar];
[self rotateControlBar];
[self rotatePlayer];
[super rotateShareLayer];
}
但我在 iPod 5 上进行测试,但它不起作用。 尝试了一些东西,但直到现在都没有运气。
干杯。
【问题讨论】:
-
看看this question,我相信它和你的问题几乎完全一样。
标签: iphone ios6 uiinterfaceorientation ipod-touch