- (void)viewDidLayoutSubviews
{
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight)
{
self.admobBanner.adSize = kGADAdSizeSmartBannerLandscape;
}
else
{
self.admobBanner.adSize = kGADAdSizeSmartBannerPortrait;
}
NSLog(@"%.f %.f", self.admobBanner.frame.size.width, self.admobBanner.frame.size.height);
CGRect adFrame = self.admobBanner.frame;
adFrame.origin.y = newY;
self.admobBanner.frame = adFrame;
}
After assigning adSize = kGADAdSizeSmartBannerLandscape, admobBanner.frame.size.width has a wrong value 320 even though it should be 480 or wider values based on iPhone model.
Could you please fix it asap?
2014년 9월 11일 목요일 오전 6시 47분 58초 UTC+9, Eric Leichtenschlag 님의 말: