-
SonaredLikes 0Problem Description
I’ve implemented Admob banner via Sonar Helper.
and also,
implemented Multi-device resolution support with the tutorial from Sonar: https://www.youtube.com/watch?v=C-MKlYLbn5Q.
But I realize that the admob height appears differently in iPhone6 and 4.
While the height is 100 in iphone6, it takes up more than that in iphone4 (the banner size itself is the same)
Would there be any way to detect the banner height for different screen resolutions?
(cf) 100 in height appears differnt in iPhone6 and 4 according to https://www.youtube.com/watch?v=C-MKlYLbn5Q.
-
Sonar Systems adminLikes 0
What do you need the height for?
This reply has been verified.
-
SonaredLikes 0
I want to place something right above the banner.
For iPhone5 and 6, the banner height is 100. But in iPhone4, it’s about 120.
So I did:
Vec2 origion = Director::getInstance()->getVisibleOrigin();
sprite->setPosition(Vec2(0 + origin.x, 100 + origin.y));
, but 100 appears in different scale between devices.
screen resolution policy is in AppDelegate.cpp:
static cocos2d::Size designResolutionSize = cocos2d::Size(768, 1136);
and
glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::NO_BORDER);
-
Sonar Systems adminLikes 1
Login to reply