int AdBannerSetVisible(int flag);

 

Sets the visibility of the iAd banner.

 

Return Value

 

Returns non-zero if successful, zero if unsuccessful or if iAds are not supported on the device.

 

Parameters

 

flag

The visibility flag to apply to the iAd banner.  Possible values are:

 

Flag Value

Description

0

Hidden

1

Visible

 

Remarks

 

AdBannerSetVisible() sets the visibility of the previously added iAd banner.

 

NOTE: If no iAd banner has yet been added, this function will have no effect.

 

Availability

 

Available in DragonFireSDK 1.4 and later on devices running iOS 4.0 or later.

 

Example

 

#include "DragonFireSDK.h"

 

int HideButton;

int MoveButton;

 

int BannerLocation=0;

int BannerVisible=1;

 

int OnButton(int value)

{

  switch (value)

   {

      case 1:

          if (BannerVisible)

               BannerVisible = 0;

          else

               BannerVisible = 1;

           AdBannerSetVisible(BannerVisible);      

          break;

      case 2:

          if (BannerLocation)

               BannerLocation = 0;

          else

               BannerLocation = 1;

           AdBannerSetLocation(BannerLocation);

          break;

      default:

          break;

   }

  return(1);  

}

 

void AppMain()

{

   HideButton = ButtonAdd("Images/Hide", 10, 100, OnButton, 1);

   MoveButton = ButtonAdd("Images/Move", 10, 150, OnButton, 2);

   AdBannerInit(BannerLocation);

}

 

void OnTimer()

{

 

}

 

void AppExit()

{

 

}