Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Commit 4852584

Browse files
committed
added badge image view
1 parent 553f5ec commit 4852584

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

JSQMessagesViewController/Views/JSQMessagesCollectionViewCell.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ @interface JSQMessagesCollectionViewCell ()
3535
@property (weak, nonatomic) IBOutlet JSQMessagesLabel *messageBubbleTopLabel;
3636
@property (weak, nonatomic) IBOutlet JSQMessagesLabel *cellBottomLabel;
3737

38+
@property (weak, nonatomic) IBOutlet UIImageView *badgeImageView;
39+
3840
@property (weak, nonatomic) IBOutlet UIView *messageBubbleContainerView;
3941
@property (weak, nonatomic) IBOutlet UIImageView *messageBubbleImageView;
4042
@property (weak, nonatomic) IBOutlet JSQMessagesCellTextView *textView;

JSQMessagesViewController/Views/JSQMessagesCollectionViewCellIncoming.xib

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
66
</dependencies>
77
<objects>
88
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -87,6 +87,9 @@
8787
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
8888
<nil key="highlightedColor"/>
8989
</label>
90+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F1E-8h-fkC">
91+
<rect key="frame" x="295" y="44" width="25" height="25"/>
92+
</imageView>
9093
</subviews>
9194
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
9295
</view>
@@ -129,10 +132,10 @@
129132
</connections>
130133
<point key="canvasLocation" x="255" y="202"/>
131134
</collectionViewCell>
135+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="2rf-aC-XB5">
136+
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
137+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
138+
<point key="canvasLocation" x="400" y="212"/>
139+
</imageView>
132140
</objects>
133-
<simulatedMetricsContainer key="defaultSimulatedMetrics">
134-
<simulatedStatusBarMetrics key="statusBar"/>
135-
<simulatedOrientationMetrics key="orientation"/>
136-
<simulatedScreenMetrics key="destination" type="retina4"/>
137-
</simulatedMetricsContainer>
138141
</document>

JSQMessagesViewController/Views/JSQMessagesCollectionViewCellOutgoing.xib

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
66
</dependencies>
77
<objects>
88
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -87,12 +87,20 @@
8787
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
8888
<nil key="highlightedColor"/>
8989
</label>
90+
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Kch-fV-09d">
91+
<rect key="frame" x="5" y="45" width="25" height="25"/>
92+
<constraints>
93+
<constraint firstAttribute="width" constant="25" id="BxB-av-bnK"/>
94+
<constraint firstAttribute="height" constant="25" id="Pqi-kN-qyh"/>
95+
</constraints>
96+
</imageView>
9097
</subviews>
9198
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
9299
</view>
93100
<constraints>
94101
<constraint firstAttribute="trailing" secondItem="7Uc-dI-YDD" secondAttribute="trailing" id="1v4-5s-XmK"/>
95102
<constraint firstItem="2zh-vR-QJW" firstAttribute="top" secondItem="p52-YN-yLu" secondAttribute="bottom" id="3Wx-g0-fTc"/>
103+
<constraint firstItem="Kch-fV-09d" firstAttribute="leading" secondItem="23f-xH-rkY" secondAttribute="leading" constant="5" id="8ts-id-sMd"/>
96104
<constraint firstAttribute="trailing" secondItem="jxM-YD-sVG" secondAttribute="trailing" id="AwY-g7-f1T"/>
97105
<constraint firstItem="jxM-YD-sVG" firstAttribute="top" secondItem="23f-xH-rkY" secondAttribute="top" id="HYT-Tw-whz"/>
98106
<constraint firstAttribute="trailing" secondItem="X89-B1-aAd" secondAttribute="trailing" id="KLt-Ix-wDa"/>
@@ -102,6 +110,7 @@
102110
<constraint firstAttribute="trailing" secondItem="p52-YN-yLu" secondAttribute="trailing" id="gen-N0-uZj"/>
103111
<constraint firstItem="7Uc-dI-YDD" firstAttribute="top" secondItem="X89-B1-aAd" secondAttribute="bottom" id="iiF-tn-5Ir"/>
104112
<constraint firstItem="p52-YN-yLu" firstAttribute="top" secondItem="jxM-YD-sVG" secondAttribute="bottom" id="jBD-JV-AWk"/>
113+
<constraint firstItem="Kch-fV-09d" firstAttribute="top" secondItem="p52-YN-yLu" secondAttribute="bottom" constant="5" id="pRE-Uv-klH"/>
105114
<constraint firstItem="jxM-YD-sVG" firstAttribute="leading" secondItem="23f-xH-rkY" secondAttribute="leading" id="qeB-G5-1Wq"/>
106115
<constraint firstItem="p52-YN-yLu" firstAttribute="leading" secondItem="23f-xH-rkY" secondAttribute="leading" id="tTj-Mp-0va"/>
107116
<constraint firstItem="X89-B1-aAd" firstAttribute="leading" secondItem="2zh-vR-QJW" secondAttribute="trailing" constant="2" id="vMz-Yi-B0w"/>
@@ -112,6 +121,7 @@
112121
<outlet property="avatarContainerViewHeightConstraint" destination="tgw-aN-JJu" id="pgV-tY-5Cm"/>
113122
<outlet property="avatarContainerViewWidthConstraint" destination="Pkm-tW-k4z" id="Cpe-d3-yiq"/>
114123
<outlet property="avatarImageView" destination="y9b-D9-Q7W" id="cZo-SR-S9h"/>
124+
<outlet property="badgeImageView" destination="Kch-fV-09d" id="Sn4-t1-NZq"/>
115125
<outlet property="cellBottomLabel" destination="7Uc-dI-YDD" id="gVD-C2-UcZ"/>
116126
<outlet property="cellBottomLabelHeightConstraint" destination="cPs-M4-tjX" id="b5k-6e-iA8"/>
117127
<outlet property="cellTopLabel" destination="jxM-YD-sVG" id="acH-pr-spx"/>
@@ -130,9 +140,4 @@
130140
<point key="canvasLocation" x="371" y="145"/>
131141
</collectionViewCell>
132142
</objects>
133-
<simulatedMetricsContainer key="defaultSimulatedMetrics">
134-
<simulatedStatusBarMetrics key="statusBar"/>
135-
<simulatedOrientationMetrics key="orientation"/>
136-
<simulatedScreenMetrics key="destination" type="retina4"/>
137-
</simulatedMetricsContainer>
138143
</document>

0 commit comments

Comments
 (0)