UIImageView のサブビューとして追加された CALayer (CAGradientLayer) があります。UIImageView のサブレイヤーとして正常に追加しましたが、方向についてはレイヤーの幅を調整したいと思います。どうすればそうできますか?次のコードを試してみましたが、成功しませんでした:
- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self.imageOverlay setFrame:self.backgroundImageView_.bounds];
[self.gradientOverlay setFrame:self.view.bounds];
}