我正在我的iPad应用程序中实现iAd横幅它加载得很好,但是当我点击它时,它会将我的应用方向更改为横向,并且在关闭添加后它保持横向模式,我应该在纵向模式中。我怎么能解决这个问题我正在使用iOS 7 sdks
这是我的代码
#pragma mark - AdBannerViewDelegate method implementation
-(void)bannerViewWillLoadAd:(ADBannerView *)banner{
NSLog(@"Ad Banner will load ad.");
}
-(void)bannerViewDidLoadAd:(ADBannerView *)banner{
NSLog(@"Ad Banner did load ad.");
// Show the ad banner.
[UIView animateWithDuration:0.5 animations:^{
self.adBanner.alpha = 1.0;
}];
}
-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave{
NSLog(@"Ad Banner action is about to begin.");
// self.pauseTimeCounting = YES;
return YES;
}
-(void)bannerViewActionDidFinish:(ADBannerView *)banner{
NSLog(@"Ad Banner action did finish");
// self.pauseTimeCounting = NO;
}
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
NSLog(@"Unable to show ads. Error: %@", [error localizedDescription]);
// Hide the ad banner.
[UIView animateWithDuration:0.5 animations:^{
self.adBanner.alpha = 0.0;
}];
}