为什么ADBannerView在我的Cocos2D V3 RC1项目中的设备之间出现奇怪?

时间:2014-03-02 15:07:26

标签: ios iphone cocos2d-iphone iad adbannerview

我像这样创建我的AdBannerView:

adBannerView = [[ADBannerView alloc] init];
adBannerView.backgroundColor = [UIColor whiteColor];
adBannerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
CGSize sizeToFit = [adBannerView sizeThatFits:[[CCDirector sharedDirector] view].frame.size];
[adBannerView setFrame:CGRectMake(([[CCDirector sharedDirector] view].frame.size.width - sizeToFit.width)/2.0f, 0, sizeToFit.width, sizeToFit.height)];
adBannerView.delegate = self;
[[[CCDirector sharedDirector] view] addSubview:adBannerView];

问题在于,虽然视图在iPhone设备上正常显示:

enter image description here

...这些广告在iPad设备上看起来很奇怪,就好像它们被夹在不同的点上一样:

enter image description here

为什么会这样?

0 个答案:

没有答案