如何在横屏或竖屏模式下自动更改ADBannerView的大小。
iAd以横向模式显示,但不以纵向模式显示。
发布于 2011-04-27 20:16:18
您必须使用CGRectMake方法。
代码ex:
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientation Portrait) {
banner.frame = CGRectMake (0,0,768,70)
}
else {
banner.frame = CGRectMake (0,0,1024,70)
}https://stackoverflow.com/questions/4244304
复制相似问题