AdstirMraidView Class Reference - united-adstir/AdStir-Integration-Guide-iOS GitHub Wiki
バナー広告を呼び出すためのクラスです。
Properties
intervalTime
広告のローテーション時間を設定します。
デフォルトのローテーション時間は60秒で、最小のローテーション時間は30秒です。
0を設定するとローテーションは無効になります。
@property (assign) NSUInteger intervalTime;
delegate
バナー広告のDelegateを設定してください。 AdstirMraidViewDelegateの詳細はこちらをご覧ください。
@property (weak) id<AdstirMraidViewDelegate> delegate;
media
メディアIDを設定します。
@property (nonatomic, copy, asadnonnull) NSString* media;
spot
枠Noを設定します。
@property (nonatomic, assign) NSUInteger spot;
autoloadEnabled
YESを設定すると、AdstirMraidViewがWindowに追加される際に自動でバナー広告の読み込みが始まります。
デフォルトではNOが設定されています。
@property (nonatomic, assign, getter=isAutoloadEnabled) BOOL autoloadEnabled;
Class Methods
+setTestModeEnabled:
テストモードの有効/無効を切り替えます。有効にする場合はYES、無効にする場合はNOを設定してください。デフォルトではテストモードは無効になっています。
+ (void)setTestModeEnabled:(BOOL)enabled;
Parameters
- enabled
- テストモードの有効/無効
+testModeEnabled
テストモードの有効/無効を取得します。
+ (BOOL)testModeEnabled
Returns
- enabled
- テストモードの有効/無効
Instance Methods
-initWithAdSize:media:spot:
親ビューの左上を起点として初期化を行います。
広告サイズについてはこちらをご覧ください。
- (instancetype)initWithAdSize:(AdstirAdSize)size media:(NSString *)media spot:(NSUInteger)spot
Parameters
- size
- 広告サイズ
- media
- メディアID
- spot
- スポットID
-initWithAdSize:origin:media:spot:
親ビューに対する位置を指定して初期化を行います。
広告サイズについてはこちらをご覧ください。
- (instancetype)initWithAdSize:(AdstirAdSize)size origin:(CGPoint)origin media:(NSString *)media spot:(NSUInteger)spot
Parameters
- size
- 広告サイズ
- origin
- 親ビューに対する位置
- media
- メディアID
- spot
- スポットID
-start
バナー広告の読み込みを行います。
- (void)start
-stop
バナー広告の読み込みを停止します。
- (void)stop