このコードは、splitviewアプリのDetailView.mで使用しています。これで、デバイスが回転したときにのみ方向の変更が発生します。アプリの起動時に検出は行われません。私もこの警告を受け取ります
警告:「RootViewController」は「-adjustViewsForOrientation:」に応答しない可能性があります
アプリの起動時にアプリにオリエンテーションコードを調整させるには、どのような変更が必要ですか。
> - (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
> duration:(NSTimeInterval)duration {
> [self adjustViewsForOrientation:toInterfaceOrientation];
> }
>
> - (void) adjustViewsForOrientation:(UIInterfaceOrientation)orientation
> {
> if (orientation == UIInterfaceOrientationLandscapeLeft ||
> orientation ==
> UIInterfaceOrientationLandscapeRight)
> {
> detailDescriptionLabel.center = CGPointMake(235.0f, 42.0f);
> bigthumbImageView.center = CGPointMake(355.0f, 70.0f);
>
> }
> else if (orientation == UIInterfaceOrientationPortrait ||
> orientation ==
> UIInterfaceOrientationPortraitUpsideDown)
> {
> detailDescriptionLabel.center = CGPointMake(160.0f, 52.0f);
> bigthumbImageView.center = CGPointMake(275.0f, 80.0f);
>
> } }