forked from jessesquires/JSQMessagesViewController
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift example working (jessesquires#1572)
* Initial Commit of Swift Implantation of JSQMessagesViewController. Project only as per @jessesquires request of doing small pull requests. * adding test * Add Icon * Adding viewControllers to let you actually see JSQ in action in swift.
- Loading branch information
1 parent
943d8d9
commit aecb14f
Showing
25 changed files
with
966 additions
and
739 deletions.
There are no files selected for viewing
1,213 changes: 500 additions & 713 deletions
1,213
SwiftExample/SwiftExample.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
42 changes: 30 additions & 12 deletions
42
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+14.4 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-167.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.21 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.1 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.1 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.55 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.81 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.84 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.98 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.59 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.48 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.4 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.45 KB
SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/icon40@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
SwiftExample/SwiftExample/Assets.xcassets/NiceSelfi.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "NiceSelfi.pdf" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+2.53 MB
SwiftExample/SwiftExample/Assets.xcassets/NiceSelfi.imageset/NiceSelfi.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,132 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="hMb-07-pkv"> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> | ||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="tne-QT-ifu"> | ||
<!--Chat View Controller--> | ||
<scene sceneID="uKf-uR-StC"> | ||
<objects> | ||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController"> | ||
<viewController definesPresentationContext="YES" id="LDz-Qk-5H4" customClass="ChatViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> | ||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> | ||
<viewControllerLayoutGuide type="top" id="akW-jE-VCB"/> | ||
<viewControllerLayoutGuide type="bottom" id="FiZ-11-Z81"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
<view key="view" contentMode="scaleToFill" id="C8D-k3-vrk"> | ||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
</view> | ||
<extendedEdge key="edgesForExtendedLayout" top="YES"/> | ||
<navigationItem key="navigationItem" id="hKr-kB-RRs"/> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="ySn-bw-W9E" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="1937" y="784"/> | ||
</scene> | ||
<!--Conversations List--> | ||
<scene sceneID="emQ-D2-9KD"> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="rSG-d1-R3b" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
<viewController title="Conversations List" id="WH2-F6-L7W" customClass="ConversationsListViewController" customModule="SwiftExample" customModuleProvider="target" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="qHn-44-yU5"/> | ||
<viewControllerLayoutGuide type="bottom" id="ApF-ta-23l"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="V8E-M4-6Y8"> | ||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Welcome to JSQMessages implimented in swift." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ONT-SB-L2v"> | ||
<rect key="frame" x="113" y="290" width="367" height="21"/> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to JSQ implimented in swift." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cIn-9i-tSU"> | ||
<rect key="frame" x="156" y="84" width="289" height="21"/> | ||
<fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="7Kh-1k-qFd"> | ||
<rect key="frame" x="0.0" y="125" width="600" height="475"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
<prototypes> | ||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" rowHeight="80" id="QGx-Qz-miQ" customClass="ConversationTableViewCell" customModule="SwiftExample" customModuleProvider="target"> | ||
<rect key="frame" x="0.0" y="28" width="600" height="80"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QGx-Qz-miQ" id="K1X-ex-mSQ"> | ||
<rect key="frame" x="0.0" y="0.0" width="567" height="79"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Here is the latest text in the conversation" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V7t-mk-fkA"> | ||
<rect key="frame" x="28" y="42" width="531" height="20"/> | ||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> | ||
<color key="textColor" red="0.45098039220000002" green="0.47450980390000003" blue="0.50588235290000005" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WXJ-bu-lqG"> | ||
<rect key="frame" x="28" y="18" width="531" height="20"/> | ||
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> | ||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
<constraints> | ||
<constraint firstItem="WXJ-bu-lqG" firstAttribute="top" secondItem="K1X-ex-mSQ" secondAttribute="topMargin" constant="10" id="UHE-Wi-dbR"/> | ||
<constraint firstItem="V7t-mk-fkA" firstAttribute="top" secondItem="WXJ-bu-lqG" secondAttribute="bottom" constant="4" id="eLA-zk-Tua"/> | ||
<constraint firstAttribute="trailingMargin" secondItem="V7t-mk-fkA" secondAttribute="trailing" id="kJd-LB-w7p"/> | ||
<constraint firstItem="WXJ-bu-lqG" firstAttribute="leading" secondItem="K1X-ex-mSQ" secondAttribute="leadingMargin" constant="20" id="kK0-tv-9I1"/> | ||
<constraint firstItem="V7t-mk-fkA" firstAttribute="leading" secondItem="K1X-ex-mSQ" secondAttribute="leadingMargin" constant="20" id="kxQ-0W-rgR"/> | ||
<constraint firstAttribute="trailingMargin" secondItem="WXJ-bu-lqG" secondAttribute="trailing" id="qV7-dd-q3Z"/> | ||
</constraints> | ||
</tableViewCellContentView> | ||
<connections> | ||
<outlet property="nameLabel" destination="WXJ-bu-lqG" id="zyF-iW-XEx"/> | ||
<outlet property="recentTextLabel" destination="V7t-mk-fkA" id="XqG-Ln-4fN"/> | ||
</connections> | ||
</tableViewCell> | ||
</prototypes> | ||
<connections> | ||
<outlet property="dataSource" destination="WH2-F6-L7W" id="4OP-CU-tY6"/> | ||
<outlet property="delegate" destination="WH2-F6-L7W" id="ChH-EQ-m9M"/> | ||
</connections> | ||
</tableView> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
<color key="backgroundColor" red="0.8302573073598174" green="0.87297636383810739" blue="0.92767843876060607" alpha="1" colorSpace="calibratedRGB"/> | ||
<constraints> | ||
<constraint firstItem="ONT-SB-L2v" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="8G7-dT-hkC"/> | ||
<constraint firstItem="ONT-SB-L2v" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="qCV-oD-dTW"/> | ||
<constraint firstItem="ApF-ta-23l" firstAttribute="top" secondItem="7Kh-1k-qFd" secondAttribute="bottom" id="54S-U7-2DN"/> | ||
<constraint firstItem="cIn-9i-tSU" firstAttribute="centerX" secondItem="V8E-M4-6Y8" secondAttribute="centerX" id="NVa-bC-Zk5"/> | ||
<constraint firstItem="7Kh-1k-qFd" firstAttribute="leading" secondItem="V8E-M4-6Y8" secondAttribute="leading" id="Oj4-HN-eLC"/> | ||
<constraint firstItem="cIn-9i-tSU" firstAttribute="top" secondItem="qHn-44-yU5" secondAttribute="bottom" constant="20" id="RAK-dX-4Be"/> | ||
<constraint firstItem="7Kh-1k-qFd" firstAttribute="top" secondItem="cIn-9i-tSU" secondAttribute="bottom" constant="20" id="kuz-gP-quw"/> | ||
<constraint firstAttribute="trailing" secondItem="7Kh-1k-qFd" secondAttribute="trailing" id="wBU-jJ-Qzp"/> | ||
</constraints> | ||
</view> | ||
<navigationItem key="navigationItem" title="Conversations List" id="fHU-aA-LNP"/> | ||
<connections> | ||
<outlet property="tableView" destination="7Kh-1k-qFd" id="66j-qg-po1"/> | ||
<segue destination="LDz-Qk-5H4" kind="show" identifier="ConversationSegue" id="dG0-k9-Co5"/> | ||
</connections> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="504" y="562"/> | ||
<point key="canvasLocation" x="1159" y="787"/> | ||
</scene> | ||
<!--Navigation Controller--> | ||
<scene sceneID="DoX-19-RhE"> | ||
<objects> | ||
<navigationController id="hMb-07-pkv" sceneMemberID="viewController"> | ||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> | ||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/> | ||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="h6X-xz-oj1"> | ||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</navigationBar> | ||
<connections> | ||
<segue destination="WH2-F6-L7W" kind="relationship" relationship="rootViewController" id="Spu-Wa-ikz"/> | ||
</connections> | ||
</navigationController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Tq6-Pp-20K" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="372" y="787"/> | ||
</scene> | ||
</scenes> | ||
</document> |
Oops, something went wrong.