diff options
author | Vitaly Takmazov | 2018-03-04 10:22:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-04 10:22:28 +0300 |
commit | 782219f3cdc8cac644cc33657813a5f8319dbae7 (patch) | |
tree | 65591cd2beb07dd6364a78f6e1154798ae00cf0a /Juick/Views | |
parent | 5d0e97b3c1a1910a036f455b67205bc5eece1c29 (diff) |
groups_pms
Diffstat (limited to 'Juick/Views')
-rw-r--r-- | Juick/Views/BubbleMessageCell.xib | 74 | ||||
-rw-r--r-- | Juick/Views/ConversationCell.h | 20 | ||||
-rw-r--r-- | Juick/Views/ConversationCell.m | 26 | ||||
-rw-r--r-- | Juick/Views/ConversationCell.xib | 83 |
4 files changed, 203 insertions, 0 deletions
diff --git a/Juick/Views/BubbleMessageCell.xib b/Juick/Views/BubbleMessageCell.xib new file mode 100644 index 0000000..a2b6bc3 --- /dev/null +++ b/Juick/Views/BubbleMessageCell.xib @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <dependencies> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="bubbleMessageCell" rowHeight="192" id="8qR-do-bgA" customClass="BubbleMessageCell" customModule="SawIM" customModuleProvider="target"> + <rect key="frame" x="0.0" y="0.0" width="320" height="192"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8qR-do-bgA" id="PhM-Oe-eqm"> + <frame key="frameInset" width="320" height="191.5"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="W9k-Ah-WF5"> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="qtf-Wj-Irh"> + <subviews> + <imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ho8-hh-u3y"> + <constraints> + <constraint firstAttribute="height" constant="32" id="9Sy-AS-4re"/> + <constraint firstAttribute="width" constant="32" id="RrY-5f-4RF"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Y" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5rl-Qo-5oW"> + <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> + <color key="textColor" red="0.90980392160000001" green="0.098039215690000001" blue="0.21960784310000001" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <constraints> + <constraint firstAttribute="width" constant="42" id="yDF-xj-FsY"/> + </constraints> + </stackView> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="xm7-By-6oe"> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="ermine" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UEj-yl-U0d"> + <fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="1000" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yf3-FC-T1Y" customClass="FixedLabel" customModule="SawIM" customModuleProvider="target"> + <string key="text">Lorem sdsdasds sdsada ddas dsad asdsadas dasd asdsa sadsa dasdsad asd asdas dasd asdas dasd asdas dasdasdasd asdasdasdadasdasd asdasd asdas dasdsa dasdasdasdasdas dasdas</string> + <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> + <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> + <nil key="highlightedColor"/> + </label> + </subviews> + </stackView> + </subviews> + <gestureRecognizers/> + </stackView> + </subviews> + <gestureRecognizers/> + <constraints> + <constraint firstAttribute="bottom" secondItem="W9k-Ah-WF5" secondAttribute="bottom" constant="6" id="CgD-bU-WMY"/> + <constraint firstAttribute="trailing" secondItem="W9k-Ah-WF5" secondAttribute="trailing" constant="6" id="RoA-b3-BQX"/> + <constraint firstItem="W9k-Ah-WF5" firstAttribute="top" secondItem="PhM-Oe-eqm" secondAttribute="top" constant="6" id="Rv2-RF-ZEt"/> + <constraint firstItem="W9k-Ah-WF5" firstAttribute="leading" secondItem="PhM-Oe-eqm" secondAttribute="leading" constant="6" id="qL4-Ze-A0a"/> + </constraints> + </tableViewCellContentView> + <gestureRecognizers/> + <connections> + <outlet property="avatarView" destination="ho8-hh-u3y" id="K5q-kz-70L"/> + <outlet property="message" destination="yf3-FC-T1Y" id="OjQ-pM-haS"/> + <outlet property="name" destination="UEj-yl-U0d" id="pow-Xt-INP"/> + <outlet property="unreadMarker" destination="5rl-Qo-5oW" id="jSH-ww-MO9"/> + </connections> + <point key="canvasLocation" x="461" y="234"/> + </tableViewCell> + </objects> +</document> diff --git a/Juick/Views/ConversationCell.h b/Juick/Views/ConversationCell.h new file mode 100644 index 0000000..f31057b --- /dev/null +++ b/Juick/Views/ConversationCell.h @@ -0,0 +1,20 @@ +// +// ConversationCell.h +// Juick +// +// Created by Vitaly Takmazov on 04/03/2018. +// Copyright © 2018 com.juick. All rights reserved. +// + +#import <UIKit/UIKit.h> +#import "Chat.h" + +@interface ConversationCell : UITableViewCell +@property (strong, nonatomic) IBOutlet UILabel *chatName; +@property (strong, nonatomic) IBOutlet UIImageView *avatar; +@property (strong, nonatomic) IBOutlet UILabel *lastMessage; +@property (strong, nonatomic) IBOutlet UILabel *unreadMarker; + +-(void) configureWithChat:(Chat *)chat; + +@end diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m new file mode 100644 index 0000000..750ab45 --- /dev/null +++ b/Juick/Views/ConversationCell.m @@ -0,0 +1,26 @@ +// +// ConversationCell.m +// Juick +// +// Created by Vitaly Takmazov on 04/03/2018. +// Copyright © 2018 com.juick. All rights reserved. +// + +#import "ConversationCell.h" +@import YYWebImage; + +@implementation ConversationCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +-(void) configureWithChat:(Chat *)chat { + self.chatName.text = chat.uname; + self.lastMessage.text = @""; + self.unreadMarker.text = @""; + [self.avatar yy_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.uid intValue]]] options:YYWebImageOptionProgressiveBlur|YYWebImageOptionSetImageWithFadeAnimation]; +} + +@end diff --git a/Juick/Views/ConversationCell.xib b/Juick/Views/ConversationCell.xib new file mode 100644 index 0000000..504f7a4 --- /dev/null +++ b/Juick/Views/ConversationCell.xib @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> + <device id="retina4_7" orientation="portrait"> + <adaptation id="fullscreen"/> + </device> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> + <capability name="Constraints to layout margins" minToolsVersion="6.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <objects> + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="notificationCell" rowHeight="127" id="eKX-ht-IFf" customClass="ConversationCell"> + <rect key="frame" x="0.0" y="0.0" width="478" height="127"/> + <autoresizingMask key="autoresizingMask"/> + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="eKX-ht-IFf" id="3NU-ng-4QM"> + <rect key="frame" x="0.0" y="0.0" width="478" height="126.5"/> + <autoresizingMask key="autoresizingMask"/> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="6O8-u9-Jvc"> + <rect key="frame" x="6" y="17" width="466" height="93"/> + <subviews> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="Sas-e1-iNF"> + <rect key="frame" x="0.0" y="17.5" width="42" height="58.5"/> + <subviews> + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="WsB-eh-dhD"> + <rect key="frame" x="5" y="0.0" width="32" height="32"/> + <constraints> + <constraint firstAttribute="width" constant="32" id="6ox-eq-Vlp"/> + <constraint firstAttribute="height" constant="32" id="e88-rG-unU"/> + </constraints> + </imageView> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="●" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jW2-kr-sJn"> + <rect key="frame" x="13.5" y="38" width="15" height="20.5"/> + <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> + <color key="textColor" red="0.90980392160000001" green="0.098039215690000001" blue="0.21960784310000001" alpha="1" colorSpace="calibratedRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + <constraints> + <constraint firstAttribute="width" constant="42" id="5Yp-OO-aaj"/> + </constraints> + </stackView> + <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="dJe-jR-n42"> + <rect key="frame" x="54" y="11.5" width="412" height="70.5"/> + <subviews> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TTg-gl-dzG"> + <rect key="frame" x="0.0" y="0.0" width="412" height="20.5"/> + <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/> + <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EiA-lG-gV5"> + <rect key="frame" x="0.0" y="32.5" width="412" height="38"/> + <string key="text">Lorem sdsdasds sdsada ddas dsad asdsadas dasd asdsa sadsa dasdsad asd asdas dasd asdas dasd asdas dasdasdasd asdasdasdadasdasd asdasd asdas dasdsa dasdasdasdasdas dasdas</string> + <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> + <color key="textColor" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + <nil key="highlightedColor"/> + </label> + </subviews> + </stackView> + </subviews> + </stackView> + </subviews> + <constraints> + <constraint firstAttribute="bottomMargin" secondItem="6O8-u9-Jvc" secondAttribute="bottom" constant="6" id="O4J-FE-mKI"/> + <constraint firstItem="6O8-u9-Jvc" firstAttribute="leading" secondItem="3NU-ng-4QM" secondAttribute="leading" constant="6" id="h0T-Kd-7A4"/> + <constraint firstAttribute="trailing" secondItem="6O8-u9-Jvc" secondAttribute="trailing" constant="6" id="igy-EX-VYt"/> + <constraint firstItem="6O8-u9-Jvc" firstAttribute="top" secondItem="3NU-ng-4QM" secondAttribute="topMargin" constant="6" id="lS8-Oc-I4J"/> + </constraints> + </tableViewCellContentView> + <connections> + <outlet property="avatar" destination="WsB-eh-dhD" id="idO-P8-5l8"/> + <outlet property="chatName" destination="TTg-gl-dzG" id="GDL-GY-n6E"/> + <outlet property="lastMessage" destination="EiA-lG-gV5" id="Eq9-zQ-ivW"/> + <outlet property="unreadMarker" destination="jW2-kr-sJn" id="E5Q-wn-yln"/> + </connections> + <point key="canvasLocation" x="-1164" y="-1"/> + </tableViewCell> + </objects> +</document> |