Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

ADBannerView wrong position

Discussion in 'iOS and tvOS' started by BeetlePlay, Jan 31, 2013.

  1. BeetlePlay

    BeetlePlay

    Joined:
    Jan 31, 2013
    Posts:
    18
    I try to show iAd with ADBannerView in my game.
    All work good on iPad, but on my iPhone 4S I see this:



    Banner placed higher than it should.
    Determining the height of the banner is not correct.

    Unity 3.5.7

    Code that I use to show banner:
    Code (csharp):
    1. banner = new ADBannerView();
    2. banner.autoSize = true;
    3. banner.autoPosition = ADPosition.Bottom;
    How this can be fixed ?
     
  2. rockpin-games

    rockpin-games

    Joined:
    Feb 4, 2013
    Posts:
    17
    I'm having the same problem. Does anyone know a solution?
     
  3. rockpin-games

    rockpin-games

    Joined:
    Feb 4, 2013
    Posts:
    17
    Code (csharp):
    1. if(Screen.height<700) {
    2.     banner.autoPosition = ADPosition.Manual;
    3.     banner.position = new Vector2(0, 288);
    4. } else {
    5.     banner.autoPosition = ADPosition.Bottom;
    6. }
    This solves it for me. It may be a problem with universal apps as ad height is different in iphone and ipad.
     
  4. BeetlePlay

    BeetlePlay

    Joined:
    Jan 31, 2013
    Posts:
    18
    Place banner manually is a bad solution, because if you receive another higher ad you will put it out of screen partially.
    This problem in Unity, banner height determining is wrong and you can't know what is actual banner height.
     
  5. rockpin-games

    rockpin-games

    Joined:
    Feb 4, 2013
    Posts:
    17
  6. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,602
    guys, not to worry. We are rewriting our iAD support, so it will be better soon, i promise 8)
     
  7. WarbladerToo

    WarbladerToo

    Joined:
    Nov 2, 2009
    Posts:
    96
    AdBannerView is still showing banner at wrong position on the iPhone 5. (Using unity 4.2.2) So I guess this is still not fixed??

    banner.autoSize = true;
    banner.autoPosition = ADPosition.Bottom

    Banner will show up a little bit below center of screen (landscape mode game)
     
  8. rahulpatil6220375

    rahulpatil6220375

    Joined:
    Dec 10, 2018
    Posts:
    19


    when i am click share button then banner ads position is upp?