Unity3d_ADBannerView
            时间:2014-05-21 21:55:14  
            收藏:0  
            阅读:445
        
        
        原地址:http://blog.csdn.net/cynixway/article/details/7686393
ADBnnerView提供对Apple iAd框架中ADBannerView的包中,只在iPhone/iPad/iPod Touch中可用
它提供了用来向客户展示条幅广告的视图
private var banner : ADBannerView = null; function ShowBanner() { while (!banner.loaded && banner.error == null) yield; if (banner.error == null) banner.Show(); else banner = null; } function OnGUI() { GUI.enabled = (banner == null ? true : false); if (GUILayout.Button("Show Banner")) { banner = new ADBannerView(); banner.autoSize = true; banner.autoPosition = ADPosition.Bottom; StartCoroutine(ShowBanner()); } }
变量:
| requiredSizeIdentifiers | 
       条幅视图可以展示的广告的识别符.  | 
| currentSizeIdentifier | 
       当前条幅视图正在显示的广告的识别符  | 
| autoSize | 
       如果设置为使能,当前条幅视图大小随屏幕方向自动适应.默认为禁止.  | 
| position | 
       条幅视图的位置  | 
| autoPosition | 
       条幅视图位置是否自动放置  | 
| visible | 
       条幅视图是否可见(只读)  | 
| loaded | 
       条幅视图是否已经加载广告(只读)  | 
| actionInProgress | 
       Is the banner currently executing a user-triggered action?(Read Only)条幅是否执行了用户触发动作(只读)  | 
| error | 
       广告错误(只读)  | 
构造函数
| ADBannerView | 
       创建一个条幅视图.  | 
函数
| Show | 
       显示条幅视图  | 
| Hide | 
       隐藏条幅视图  | 
| CancelAction | 
       取消正在执行的动作  | 
累函数
| GetSizeFromSizeIdentifier | 
       条幅内容转换为物理尺寸  | 
            评论(0)