Dudes!UIDeviceOrientationDidChangeNotification適用於iDevice 4並且不適用於iDevice 5
需要一些緊迫的見解。 我的問題是,即使在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的測試,它無法正常工作。 嘗試了一些東西,但沒有運氣,直到現在。
歡呼聲。
看看[這個問題](http://stackoverflow.com/questions/3821151/uideviceorientationdidchangenotification-not-firing),它幾乎完全一樣的問題,因爲你,我相信。 –