Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int adpos = 2;
- int step = 0
- for(int i = 0; i < array.count; i++) {
- id object = array[i];
- if ([object isKindOfClass:[RelatedNewsListModel class]]) {
- if (step == adpos) {
- [array insertObject:[DFPNativeModel new] atIndex:i];
- step = -1;
- }
- step++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement