Skip to content

Commit 5b15521

Browse files
author
Nikolaï Roycourt
committed
Clean code
1 parent 86d0e8b commit 5b15521

14 files changed

+743
-816
lines changed

TeadsSDKDemo/Demo Pages/inRead Top/InReadTopCollectionViewController.m

Lines changed: 92 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -83,213 +83,234 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
8383

8484

8585
#pragma mark -
86-
#pragma mark - TeadsAdDelegate
86+
#pragma mark - TeadsAd delegate
8787

8888
/**
89-
* NativeVideo Failed to Load
89+
* Ad failed to load
9090
*
91-
* @param interstitial : the TeadsAd object
92-
* @param error : the TeadsError object
91+
* @param ad The TeadsAd object
92+
* @param error The TeadsError object
9393
*/
94-
- (void)teadsAd:(TeadsAd *)nativeVideo didFailLoading:(TeadsError *)error {
94+
- (void)teadsAd:(TeadsAd *)ad didFailLoading:(TeadsError *)error {
9595

9696
}
9797

9898
/**
99-
* NativeVideo Will Load (loading)
99+
* Ad will load (loading)
100100
*
101-
* @param interstitial : the TeadsAd object
101+
* @param ad The TeadsAd object
102102
*/
103-
- (void)teadsAdWillLoad:(TeadsAd *)nativeVideo {
103+
- (void)teadsAdWillLoad:(TeadsAd *)ad {
104104

105105
}
106106

107107
/**
108-
* NativeVideo Did Load (loaded successfully)
108+
* Ad did load (loaded successfully)
109109
*
110-
* @param interstitial : the TeadsAd object
110+
* @param ad The TeadsAd object
111111
*/
112-
- (void)teadsAdDidLoad:(TeadsAd *)nativeVideo {
112+
- (void)teadsAdDidLoad:(TeadsAd *)ad {
113113

114114
}
115115

116116
/**
117-
* NativeVideo Will Start Playing (loading)
117+
* Ad experience will start
118118
*
119-
* @param nativeVideo : the TeadsAd object
119+
* @param ad The TeadsAd object
120120
*/
121-
- (void)teadsAdWillStart:(TeadsAd *)nativeVideo {
121+
- (void)teadsAdWillStart:(TeadsAd *)ad {
122122

123123
}
124124

125125
/**
126-
* NativeVideo Did Start Playing (playing)
126+
* Ad experience did start
127127
*
128-
* @param nativeVideo : the TeadsAd object
128+
* @param ad The TeadsAd object
129129
*/
130-
- (void)teadsAdDidStart:(TeadsAd *)nativeVideo {
130+
- (void)teadsAdDidStart:(TeadsAd *)ad {
131131

132132
}
133133

134134
/**
135-
* NativeVideo Will Stop Playing (stopping)
135+
* Ad experience stop
136136
*
137-
* @param nativeVideo : the TeadsAd object
137+
* @param ad The TeadsAd object
138138
*/
139-
- (void)teadsAdWillStop:(TeadsAd *)nativeVideo {
139+
- (void)teadsAdWillStop:(TeadsAd *)ad {
140140

141141
}
142142

143143
/**
144-
* NativeVideo Did Stop Playing (stopped)
144+
* Ad experience did stop
145145
*
146-
* @param nativeVideo : the TeadsAd object
146+
* @param ad The TeadsAd object
147147
*/
148-
- (void)teadsAdDidStop:(TeadsAd *)nativeVideo {
148+
- (void)teadsAdDidStop:(TeadsAd *)ad {
149149

150150
}
151151

152152
/**
153-
* NativeVideo Did Pause (paused)
153+
* Ad experience did pause
154154
*
155-
* @param nativeVideo : the TeadsAd object
155+
* @param ad The TeadsAd object
156156
*/
157-
- (void)teadsAdDidPause:(TeadsAd *)nativeVideo {
157+
- (void)teadsAdDidPause:(TeadsAd *)ad {
158158

159159
}
160160

161161
/**
162-
* NativeVideo Did Resume (playing)
162+
* Ad experience did resume
163163
*
164-
* @param nativeVideo : the TeadsAd object
164+
* @param ad The TeadsAd object
165165
*/
166-
- (void)teadsAdDidResume:(TeadsAd *)nativeVideo {
166+
- (void)teadsAdDidResume:(TeadsAd *)ad {
167167

168168
}
169169

170170
/**
171-
* NativeVideo Did Mute Sound
171+
* Ad did mute sound
172172
*
173-
* @param nativeVideo : the TeadsAd object
173+
* @param ad The TeadsAd object
174174
*/
175-
- (void)teadsAdDidMute:(TeadsAd *)nativeVideo {
175+
- (void)teadsAdDidMute:(TeadsAd *)ad {
176176

177177
}
178178

179179
/**
180-
* NativeVideo Did Unmute Sound
180+
* Ad did unmute sound
181181
*
182-
* @param nativeVideo : the TeadsAd object
182+
* @param ad The TeadsAd object
183183
*/
184-
- (void)teadsAdDidUnmute:(TeadsAd *)nativeVideo {
184+
- (void)teadsAdDidUnmute:(TeadsAd *)ad {
185185

186186
}
187187

188188
/**
189-
* NativeVideo Will expand
189+
* Ad will expand
190190
*
191-
* @param nativeVideo : the TeadsAd object
191+
* @param ad The TeadsAd object
192192
*/
193-
- (void)teadsAdDidExpand:(TeadsAd *)video {
193+
- (void)teadsAdWillExpand:(TeadsAd *)ad {
194194

195195
}
196196

197197
/**
198-
* NativeVideo Will collapse
198+
* Ad did expand
199199
*
200-
* @param nativeVideo : the TeadsAd object
200+
* @param ad The TeadsAd object
201201
*/
202-
- (void)teadsAdWillCollapse:(TeadsAd *)video {
202+
- (void)teadsAdDidExpand:(TeadsAd *)ad {
203203

204204
}
205205

206206
/**
207-
* NativeVideo did collapse
207+
* Ad will collapse
208208
*
209-
* @param nativeVideo : the TeadsAd object
209+
* @param ad The TeadsAd object
210210
*/
211-
- (void)teadsAdDidCollapse:(TeadsAd *)video {
211+
- (void)teadsAdWillCollapse:(TeadsAd *)ad {
212212

213213
}
214214

215215
/**
216-
* NativeVideo was clicked
216+
* Ad did collapse
217217
*
218-
* @param nativeVideo : the TeadsAd object
218+
* @param ad The TeadsAd object
219219
*/
220-
- (void)teadsAdWasClicked:(TeadsAd *)nativeVideo {
220+
- (void)teadsAdDidCollapse:(TeadsAd *)ad {
221221

222222
}
223223

224224
/**
225-
* NativeVideo Did Stop Playing (stopped)
225+
* Ad was clicked
226226
*
227-
* @param nativeVideo : the TeadsAd object
227+
* @param ad The TeadsAd object
228228
*/
229-
- (void)teadsAdDidClickBrowserClose:(TeadsAd *)nativeVideo {
229+
- (void)teadsAdWasClicked:(TeadsAd *)ad {
230230

231231
}
232232

233233
/**
234-
* NativeVideo Will Take Over Fullscreen
234+
* Ad experience did stop
235235
*
236-
* @param nativeVideo : the TeadsAd object
236+
* @param ad The TeadsAd object
237237
*/
238-
- (void)teadsAdWillTakeOverFullScreen:(TeadsAd *)nativeVideo {
238+
- (void)teadsAdDidClickBrowserClose:(TeadsAd *)ad {
239239

240240
}
241241

242242
/**
243-
* NativeVideo Did Take Over Fullscreen
243+
* Ad will take over fullscreen
244244
*
245-
* @param nativeVideo : the TeadsAd object
245+
* @param ad The TeadsAd object
246246
*/
247-
- (void)teadsAdDidTakeOverFullScreen:(TeadsAd *)nativeVideo {
247+
- (void)teadsAdWillTakeOverFullScreen:(TeadsAd *)ad {
248248

249249
}
250250

251251
/**
252-
* NativeVideo Will Dismiss Fullscreen
252+
* Ad did take over fullscreen
253253
*
254-
* @param nativeVideo : the TeadsAd object
254+
* @param ad The TeadsAd object
255255
*/
256-
- (void)teadsAdWillDismissFullscreen:(TeadsAd *)nativeVideo {
256+
- (void)teadsAdDidTakeOverFullScreen:(TeadsAd *)ad {
257257

258258
}
259259

260260
/**
261-
* NativeVideo Did Dismiss Fullscreen
261+
* Ad qill dismiss fullscreen
262262
*
263-
* @param nativeVideo : the TeadsAd object
263+
* @param ad The TeadsAd object
264264
*/
265-
- (void)teadsAdDidDismissFullscreen:(TeadsAd *)nativeVideo {
265+
- (void)teadsAdWillDismissFullscreen:(TeadsAd *)ad {
266266

267267
}
268268

269269
/**
270-
* NativeVideo Skip Button Was Tapped (skip button pressed)
270+
* Ad did dismiss fullscreen
271271
*
272-
* @param nativeVideo : the TeadsAd object
272+
* @param ad The TeadsAd object
273273
*/
274-
- (void)teadsAdSkipButtonTapped:(TeadsAd *)nativeVideo {
274+
- (void)teadsAdDidDismissFullscreen:(TeadsAd *)ad {
275275

276276
}
277277

278278
/**
279-
* NativeVideo Skip Button Did Show (skip button appeared)
279+
* Ad Skip Button Was Tapped
280280
*
281-
* @param nativeVideo : the TeadsAd object
281+
* @param ad The TeadsAd object
282+
* @discussion Eg: skip button was pressed
282283
*/
283-
- (void)teadsAdSkipButtonDidShow:(TeadsAd *)nativeVideo {
284+
- (void)teadsAdSkipButtonTapped:(TeadsAd *)ad {
284285

285286
}
286287

287288
/**
288-
* NativeVideo did clean (all related resoures have been removed)
289+
* Ad skip button appeared
289290
*
290-
* @param nativeVideo : the TeadsAd object
291+
* @param ad The TeadsAd object
291292
*/
292-
- (void)teadsAdDidClean:(TeadsAd *)nativeVideo {
293+
- (void)teadsAdSkipButtonDidShow:(TeadsAd *)ad {
294+
295+
}
296+
297+
/**
298+
* Ad did reset
299+
*
300+
* @param ad The TeadsAd object
301+
* @discussion Player is closed if open, new `load` call can be made after
302+
*/
303+
- (void)teadsAdDidReset:(TeadsAd *)ad {
304+
305+
}
306+
307+
/**
308+
* Ad did clean
309+
*
310+
* @param ad The TeadsAd object
311+
* @discussion All related resoures have been removed
312+
*/
313+
- (void)teadsAdDidClean:(TeadsAd *)ad {
293314

294315
}
295316

0 commit comments

Comments
 (0)