Skip to content

Commit 5697529

Browse files
authored
Merge pull request #71 from teads/develop
Sample code update
2 parents 7b6c92e + 1a77477 commit 5697529

19 files changed

+1463
-862
lines changed

TeadsSDKDemo.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
913B3BF11A70F509008E3E30 /* arrow_left.png in Resources */ = {isa = PBXBuildFile; fileRef = 913B3BF01A70F509008E3E30 /* arrow_left.png */; };
1919
913CED781B67C3590058623A /* CustomAdScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 913CED771B67C3590058623A /* CustomAdScrollViewController.m */; };
2020
914E2BA51BBC23CE001D6A83 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 914E2BA41BBC23CE001D6A83 /* libxml2.tbd */; };
21+
91566E681E78451B008AF47F /* MultiCustomAdCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91566E671E78451B008AF47F /* MultiCustomAdCollectionViewController.m */; };
2122
916CFB161A68288400E36306 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 916CFB151A68288400E36306 /* main.m */; };
2223
916CFB191A68288400E36306 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 916CFB181A68288400E36306 /* AppDelegate.m */; };
2324
916CFB1F1A68288400E36306 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 916CFB1D1A68288400E36306 /* Main.storyboard */; };
@@ -107,6 +108,8 @@
107108
913CED761B67C3590058623A /* CustomAdScrollViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomAdScrollViewController.h; sourceTree = "<group>"; };
108109
913CED771B67C3590058623A /* CustomAdScrollViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomAdScrollViewController.m; sourceTree = "<group>"; };
109110
914E2BA41BBC23CE001D6A83 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
111+
91566E661E78451B008AF47F /* MultiCustomAdCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MultiCustomAdCollectionViewController.h; path = "TeadsSDKDemo/Demo Pages/inRead_multi/MultiCustomAdCollectionViewController.h"; sourceTree = SOURCE_ROOT; };
112+
91566E671E78451B008AF47F /* MultiCustomAdCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MultiCustomAdCollectionViewController.m; path = "TeadsSDKDemo/Demo Pages/inRead_multi/MultiCustomAdCollectionViewController.m"; sourceTree = SOURCE_ROOT; };
110113
916CFB101A68288400E36306 /* TeadsSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TeadsSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
111114
916CFB141A68288400E36306 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
112115
916CFB151A68288400E36306 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -216,6 +219,15 @@
216219
path = Resources;
217220
sourceTree = "<group>";
218221
};
222+
91566E651E784427008AF47F /* inRead_multi */ = {
223+
isa = PBXGroup;
224+
children = (
225+
91566E661E78451B008AF47F /* MultiCustomAdCollectionViewController.h */,
226+
91566E671E78451B008AF47F /* MultiCustomAdCollectionViewController.m */,
227+
);
228+
path = inRead_multi;
229+
sourceTree = "<group>";
230+
};
219231
916CFB071A68288400E36306 = {
220232
isa = PBXGroup;
221233
children = (
@@ -295,6 +307,7 @@
295307
916CFB401A68304900E36306 /* Demo Pages */ = {
296308
isa = PBXGroup;
297309
children = (
310+
91566E651E784427008AF47F /* inRead_multi */,
298311
91E125BA1C64B7AA0095F327 /* inRead Top */,
299312
910CB4401A695900005E6711 /* inRead */,
300313
);
@@ -498,6 +511,7 @@
498511
916CFB191A68288400E36306 /* AppDelegate.m in Sources */,
499512
91E125C51C64B7AA0095F327 /* InReadTopTableViewController.m in Sources */,
500513
91E635A41DDB0AAE00525579 /* CustomCollectionViewCell.m in Sources */,
514+
91566E681E78451B008AF47F /* MultiCustomAdCollectionViewController.m in Sources */,
501515
910CB4511A695933005E6711 /* InReadTableViewController.m in Sources */,
502516
91066C111C2B15F2003E845F /* InReadWKWebview.m in Sources */,
503517
916CFB161A68288400E36306 /* main.m in Sources */,

TeadsSDKDemo/Base.lproj/Main.storyboard

Lines changed: 102 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2659" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="KGe-QN-D1W">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="KGe-QN-D1W">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
99
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
1010
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1111
</dependencies>
@@ -837,7 +837,7 @@ It is usually presented modally and takes over the app experience while providin
837837
<scene sceneID="4hq-hX-Mlu">
838838
<objects>
839839
<navigationController id="KGe-QN-D1W" sceneMemberID="viewController">
840-
<navigationBar key="navigationBar" contentMode="scaleToFill" misplaced="YES" id="lJH-5k-tGH">
840+
<navigationBar key="navigationBar" contentMode="scaleToFill" id="lJH-5k-tGH">
841841
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
842842
<autoresizingMask key="autoresizingMask"/>
843843
</navigationBar>
@@ -1286,8 +1286,8 @@ Aliquam lobortis in orci eget facilisis. Nunc aliquam lacus vel porttitor cursus
12861286
</collectionViewCell>
12871287
</cells>
12881288
<connections>
1289-
<outlet property="dataSource" destination="HHF-6k-ruF" id="dAu-8O-u9Y"/>
1290-
<outlet property="delegate" destination="HHF-6k-ruF" id="GPi-T9-lVx"/>
1289+
<outlet property="dataSource" destination="HHF-6k-ruF" id="AAR-Ud-jsu"/>
1290+
<outlet property="delegate" destination="HHF-6k-ruF" id="5nz-L9-2no"/>
12911291
</connections>
12921292
</collectionView>
12931293
</subviews>
@@ -1301,18 +1301,113 @@ Aliquam lobortis in orci eget facilisis. Nunc aliquam lacus vel porttitor cursus
13011301
</view>
13021302
<navigationItem key="navigationItem" id="mxz-Pp-oda"/>
13031303
<connections>
1304-
<outlet property="collctnView" destination="aKV-Ul-iES" id="J8h-uZ-2dd"/>
1304+
<outlet property="collctnView" destination="aKV-Ul-iES" id="fN6-xS-SMl"/>
13051305
</connections>
13061306
</viewController>
13071307
<placeholder placeholderIdentifier="IBFirstResponder" id="qG7-IX-L2U" userLabel="First Responder" sceneMemberID="firstResponder"/>
13081308
</objects>
13091309
<point key="canvasLocation" x="3454" y="1855"/>
13101310
</scene>
1311+
<!--Multi Custom Ad Collection View Controller-->
1312+
<scene sceneID="Y3i-Sa-Tsg">
1313+
<objects>
1314+
<collectionViewController storyboardIdentifier="multiCustomAdCollectionViewController" id="dip-Do-pwX" customClass="MultiCustomAdCollectionViewController" sceneMemberID="viewController">
1315+
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" dataMode="prototypes" id="eZM-us-UrI">
1316+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1317+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1318+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
1319+
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="5" id="PC3-mb-oIk">
1320+
<size key="itemSize" width="140" height="150"/>
1321+
<size key="headerReferenceSize" width="0.0" height="0.0"/>
1322+
<size key="footerReferenceSize" width="0.0" height="0.0"/>
1323+
<inset key="sectionInset" minX="10" minY="10" maxX="10" maxY="5"/>
1324+
</collectionViewFlowLayout>
1325+
<cells>
1326+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="collecViewCell2" id="5Ad-2S-6d3" customClass="CustomCollectionViewCell">
1327+
<rect key="frame" x="10" y="10" width="140" height="200"/>
1328+
<autoresizingMask key="autoresizingMask"/>
1329+
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1330+
<rect key="frame" x="0.0" y="0.0" width="140" height="200"/>
1331+
<autoresizingMask key="autoresizingMask"/>
1332+
<subviews>
1333+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" image="teads.png" translatesAutoresizingMaskIntoConstraints="NO" id="R4t-oN-G1a">
1334+
<rect key="frame" x="0.0" y="0.0" width="140" height="150"/>
1335+
<color key="backgroundColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
1336+
</imageView>
1337+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Title Title Title Title Title Title Title Title Title " lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KA4-2P-rZF" userLabel="Title Title Title Title Title Title Title Title Title">
1338+
<rect key="frame" x="8" y="158" width="124" height="24"/>
1339+
<constraints>
1340+
<constraint firstAttribute="height" constant="24" id="8gt-h0-Lj2"/>
1341+
</constraints>
1342+
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
1343+
<nil key="highlightedColor"/>
1344+
</label>
1345+
</subviews>
1346+
</view>
1347+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
1348+
<constraints>
1349+
<constraint firstItem="R4t-oN-G1a" firstAttribute="centerX" secondItem="KA4-2P-rZF" secondAttribute="centerX" id="9jh-tR-mkB"/>
1350+
<constraint firstItem="KA4-2P-rZF" firstAttribute="top" secondItem="R4t-oN-G1a" secondAttribute="bottom" constant="8" symbolic="YES" id="Dot-pZ-EW3"/>
1351+
<constraint firstAttribute="bottomMargin" secondItem="KA4-2P-rZF" secondAttribute="bottom" constant="10" id="G0f-lY-h4x"/>
1352+
<constraint firstItem="KA4-2P-rZF" firstAttribute="leading" secondItem="5Ad-2S-6d3" secondAttribute="leadingMargin" id="K5L-dc-XTV"/>
1353+
<constraint firstAttribute="trailing" secondItem="R4t-oN-G1a" secondAttribute="trailing" id="XDZ-jn-aZw"/>
1354+
<constraint firstItem="R4t-oN-G1a" firstAttribute="top" secondItem="5Ad-2S-6d3" secondAttribute="top" id="b0U-QP-uiC"/>
1355+
<constraint firstItem="R4t-oN-G1a" firstAttribute="leading" secondItem="5Ad-2S-6d3" secondAttribute="leading" id="yWa-yY-aI2"/>
1356+
</constraints>
1357+
<size key="customSize" width="140" height="200"/>
1358+
<connections>
1359+
<outlet property="imageView" destination="R4t-oN-G1a" id="Uyd-Sj-zzT"/>
1360+
<outlet property="titleLabel" destination="KA4-2P-rZF" id="yPc-NJ-mi6"/>
1361+
</connections>
1362+
</collectionViewCell>
1363+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="teadsAdCell1" id="MpV-wQ-s2g">
1364+
<rect key="frame" x="225" y="35" width="140" height="150"/>
1365+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1366+
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1367+
<rect key="frame" x="0.0" y="0.0" width="140" height="150"/>
1368+
<autoresizingMask key="autoresizingMask"/>
1369+
</view>
1370+
</collectionViewCell>
1371+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="teadsAdCell2" id="pC5-xN-Xh8">
1372+
<rect key="frame" x="10" y="220" width="140" height="150"/>
1373+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1374+
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1375+
<rect key="frame" x="0.0" y="0.0" width="140" height="150"/>
1376+
<autoresizingMask key="autoresizingMask"/>
1377+
</view>
1378+
</collectionViewCell>
1379+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="teadsAdCell3" id="6zY-v2-cZh">
1380+
<rect key="frame" x="225" y="220" width="140" height="150"/>
1381+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1382+
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1383+
<rect key="frame" x="0.0" y="0.0" width="140" height="150"/>
1384+
<autoresizingMask key="autoresizingMask"/>
1385+
</view>
1386+
</collectionViewCell>
1387+
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="teadsAdCell4" id="4i9-eA-LdM">
1388+
<rect key="frame" x="10" y="380" width="140" height="150"/>
1389+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1390+
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1391+
<rect key="frame" x="0.0" y="0.0" width="140" height="150"/>
1392+
<autoresizingMask key="autoresizingMask"/>
1393+
</view>
1394+
</collectionViewCell>
1395+
</cells>
1396+
<connections>
1397+
<outlet property="dataSource" destination="dip-Do-pwX" id="gOv-Ij-Zf1"/>
1398+
<outlet property="delegate" destination="dip-Do-pwX" id="A8L-Yu-ABg"/>
1399+
</connections>
1400+
</collectionView>
1401+
</collectionViewController>
1402+
<placeholder placeholderIdentifier="IBFirstResponder" id="SsQ-7p-1Qu" userLabel="First Responder" sceneMemberID="firstResponder"/>
1403+
</objects>
1404+
<point key="canvasLocation" x="3458" y="2516"/>
1405+
</scene>
13111406
<!--In Read Top Collection View Controller-->
13121407
<scene sceneID="cqS-0Q-p7O">
13131408
<objects>
13141409
<collectionViewController storyboardIdentifier="inReadTopCollectionView" id="t7u-Cx-fOU" customClass="InReadTopCollectionViewController" sceneMemberID="viewController">
1315-
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" dataMode="prototypes" id="Kwr-N4-nVa">
1410+
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="Kwr-N4-nVa">
13161411
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
13171412
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13181413
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>

0 commit comments

Comments
 (0)