私はiAdを実装したアプリのみを持っています。私はそれがメインビューの上に移動するときに移動しないように設定しているが、私はデバイスを回転させると、バナーが不明瞭なエラーになることがあります。iAdデバイスのローテーションの原因が '不明瞭になることがある'警告
ページ上でセッションごとにエラーが発生するのは1回だけです。さらに回転しても繰り返しは発生しませんが、別のページに移動してもう一度警告を繰り返すことができます。
私は、アプリケーションを実行したままにしておくと、警告なしに利用可能かどうかに応じて広告が表示されます。広告が互いに重なっているようには見えません。
これは回転中に発生する可能性のある短所ですか?さらに診断できる方法はありますか?
[self.view bringSubviewToFront:theBannerView]を追加しました。アニメーションステージには、違いはありませんが、実際にはそれが問題になっているので、驚くことではありません。
- (void)changeBannerOrientation:(UIInterfaceOrientation)toOrientation
{
if (UIInterfaceOrientationIsLandscape(toOrientation)) {
self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape;
}
else {
self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
if (bannerView) {
[self changeBannerOrientation:toInterfaceOrientation];
}
}