Skip to content

Commit 384ce07

Browse files
committed
Button to present help center collections added.
1 parent fe9265f commit 384ce07

File tree

5 files changed

+61
-20
lines changed

5 files changed

+61
-20
lines changed

Examples/Sample-ObjC/Sample-ObjC/Base.lproj/Main.storyboard

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
77
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
88
</dependencies>
99
<scenes>
@@ -20,10 +20,10 @@
2020
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2121
<subviews>
2222
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="NNW-Rx-ABB">
23-
<rect key="frame" x="126" y="300" width="162" height="372"/>
23+
<rect key="frame" x="73.5" y="300" width="267" height="420"/>
2424
<subviews>
2525
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NFh-f8-qS9">
26-
<rect key="frame" x="56" y="0.0" width="50" height="36"/>
26+
<rect key="frame" x="108.5" y="0.0" width="50" height="36"/>
2727
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
2828
<state key="normal" title="Login">
2929
<color key="titleColor" red="0.0" green="0.63921568627450975" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -37,7 +37,7 @@
3737
</connections>
3838
</button>
3939
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="olB-3V-k0i">
40-
<rect key="frame" x="4" y="48" width="154" height="36"/>
40+
<rect key="frame" x="56.5" y="48" width="154" height="36"/>
4141
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
4242
<state key="normal" title="Open Messenger">
4343
<color key="titleColor" red="0.0" green="0.63921568627450975" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -51,7 +51,7 @@
5151
</connections>
5252
</button>
5353
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pjm-mE-eSC">
54-
<rect key="frame" x="29.5" y="96" width="103" height="36"/>
54+
<rect key="frame" x="82" y="96" width="103" height="36"/>
5555
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
5656
<state key="normal" title="Open Inbox">
5757
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -66,7 +66,7 @@
6666
</connections>
6767
</button>
6868
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ogC-ME-cPV">
69-
<rect key="frame" x="0.0" y="144" width="162" height="36"/>
69+
<rect key="frame" x="52.5" y="144" width="162" height="36"/>
7070
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
7171
<state key="normal" title="Open Help Center">
7272
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -79,8 +79,22 @@
7979
<action selector="openHelpCenterTapped:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="t5t-a7-akb"/>
8080
</connections>
8181
</button>
82+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lEw-9G-ddZ">
83+
<rect key="frame" x="0.0" y="192" width="267" height="36"/>
84+
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
85+
<state key="normal" title="Open Help Center Collections">
86+
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
87+
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
88+
</state>
89+
<state key="disabled">
90+
<color key="titleColor" systemColor="lightTextColor"/>
91+
</state>
92+
<connections>
93+
<action selector="openHelpCenterCollections:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="SZi-La-Ihe"/>
94+
</connections>
95+
</button>
8296
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6lg-HO-wA7">
83-
<rect key="frame" x="24.5" y="192" width="113" height="36"/>
97+
<rect key="frame" x="77" y="240" width="113" height="36"/>
8498
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
8599
<state key="normal" title="Open Article">
86100
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -94,7 +108,7 @@
94108
</connections>
95109
</button>
96110
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vl7-Ty-eCS">
97-
<rect key="frame" x="14" y="240" width="134" height="36"/>
111+
<rect key="frame" x="66.5" y="288" width="134" height="36"/>
98112
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
99113
<state key="normal" title="Open Carousel">
100114
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -109,7 +123,7 @@
109123
</connections>
110124
</button>
111125
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PFm-yh-EGt">
112-
<rect key="frame" x="23" y="288" width="116" height="36"/>
126+
<rect key="frame" x="75.5" y="336" width="116" height="36"/>
113127
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
114128
<state key="normal" title="Open Survey">
115129
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -124,7 +138,7 @@
124138
</connections>
125139
</button>
126140
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4JP-JU-5LF">
127-
<rect key="frame" x="47" y="336" width="68" height="36"/>
141+
<rect key="frame" x="99.5" y="384" width="68" height="36"/>
128142
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="20"/>
129143
<state key="normal" title="Log out">
130144
<color key="titleColor" red="0.0" green="0.63921568630000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

Examples/Sample-ObjC/Sample-ObjC/ITCViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ - (IBAction)openHelpCenterTapped:(id)sender {
7575
[Intercom presentIntercom:helpCenter];
7676
}
7777

78+
- (IBAction)openHelpCenterCollections:(id)sender {
79+
[Intercom presentContent:[IntercomContent helpCenterCollectionsWithIds:@[@"<#COLLECTION_ID_1#>", @"<#COLLECTION_ID_2#>"]]];
80+
}
81+
7882
- (IBAction)openArticle:(id)sender {
7983
[Intercom presentContent:[IntercomContent articleWithId:@"<#ARTICLE_ID#>"]];
8084
}

0 commit comments

Comments
 (0)