伙计们!
需要一些紧急的见解。我的问题是,即使 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 上进行测试,但它不起作用。尝试了一些东西,但直到现在还没有运气。
干杯。