我怎樣才能讓iad的橫幅總是在屏幕的底部,用戶可以上下滾動,但添加將始終存在(屏幕底部)。這是我的代碼,我使用的IAD:Xcode使iad粘到屏幕底部
ViewController.h
@interface ViewController : UIViewController <ADBannerViewDelegate>
ViewController.m
// Method is called when the iAd is loaded.
-(void)bannerViewDidLoadAd:(ADBannerView *)banner {
// Creates animation.
[UIView beginAnimations:nil context:nil];
// Sets the duration of the animation to 1.
[UIView setAnimationDuration:1];
// Sets the alpha to 1.
[banner setAlpha:1];
// Performs animation.
[UIView commitAnimations];
}
// Method is called when the iAd fails to load.
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
// Creates animation.
[UIView beginAnimations:nil context:nil];
// Sets the duration of the animation to 1.
[UIView setAnimationDuration:1];
// Sets the alpha to 0.
[banner setAlpha:0];
// Performs animation.
[UIView commitAnimations];
}
我在開發我的一個應用程序時爲這個特定問題實施了一個整潔的解決方案。如果您想通過https://www.codementor.io/francesco與我聯繫,我很樂意爲您提供幫助。 – singingAtom 2014-09-22 21:34:44