0

当 iphone 处于横向模式或纵向模式时,如何自动更改 ADBannerView 的大小。

iAd 以横向模式出现,但不以纵向模式出现。

4

1 回答 1

0

你必须使用 CGRectMake 方法。

代码前:

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

if (orientation == UIDeviceOrientation Portrait) {

banner.frame = CGRectMake (0,0,768,70)

}

else {

banner.frame = CGRectMake (0,0,1024,70)

}
于 2011-04-27T12:16:18.440 回答