summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-12-03 12:15:52 +0300
committerGravatar Vitaly Takmazov2017-12-03 12:15:52 +0300
commitdc73ee639bc902b7ef93cfa86630fa4ada758397 (patch)
tree866295247dc121f6b70673ef21ef85feeaff9b32 /Juick/Views
parent3ded167cf5bd443e98015523614624225169ee6f (diff)
Thread View
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/MessageCell.h4
-rw-r--r--Juick/Views/MessageCell.m10
-rw-r--r--Juick/Views/MessageCell.xib123
3 files changed, 130 insertions, 7 deletions
diff --git a/Juick/Views/MessageCell.h b/Juick/Views/MessageCell.h
index 92345d6..737ec89 100644
--- a/Juick/Views/MessageCell.h
+++ b/Juick/Views/MessageCell.h
@@ -2,8 +2,8 @@
// MessageCell.h
// Juick
//
-// Created by Vitaly Takmazov on 14/08/16.
-// Copyright © 2016 com.juick. All rights reserved.
+// Created by Vitaly Takmazov on 03/12/2017.
+// Copyright © 2017 com.juick. All rights reserved.
//
#import <UIKit/UIKit.h>
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index 236b4a3..ca84053 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -2,11 +2,10 @@
// MessageCell.m
// Juick
//
-// Created by Vitaly Takmazov on 14/08/16.
-// Copyright © 2016 com.juick. All rights reserved.
+// Created by Vitaly Takmazov on 03/12/2017.
+// Copyright © 2017 com.juick. All rights reserved.
//
-
#import "MessageCell.h"
#import "ColorScheme.h"
#import "UIImage+Utils.h"
@@ -23,11 +22,11 @@
self.text.enabledTextCheckingTypes = NSTextCheckingTypeLink;
self.text.delegate = self;
self.text.linkAttributes = @{ (id)kCTForegroundColorAttributeName: [ColorScheme linkColor],
- (id)kCTUnderlineStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle] };
+ (id)kCTUnderlineStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle] };
self.title.textColor = [ColorScheme linkColor];
self.timestamp.textColor = [UIColor grayColor];
self.summary.textColor = [UIColor grayColor];
- self.tags.textFont = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote];
+ self.tags.textFont = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote];
}
- (void) configureWithMessage:(Message *)msg {
@@ -69,4 +68,5 @@
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}
+
@end
diff --git a/Juick/Views/MessageCell.xib b/Juick/Views/MessageCell.xib
new file mode 100644
index 0000000..7a08ca9
--- /dev/null
+++ b/Juick/Views/MessageCell.xib
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+ <device id="retina4_7" orientation="portrait">
+ <adaptation id="fullscreen"/>
+ </device>
+ <dependencies>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
+ <capability name="Safe area layout guides" minToolsVersion="9.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 contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="messageCell" rowHeight="438" id="KGk-i7-Jjw" customClass="MessageCell">
+ <rect key="frame" x="0.0" y="0.0" width="574" height="438"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+ <rect key="frame" x="0.0" y="0.0" width="574" height="437.5"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="Azj-pa-GEC">
+ <rect key="frame" x="6" y="6" width="562" height="425.5"/>
+ <subviews>
+ <stackView opaque="NO" contentMode="scaleToFill" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="7FT-kJ-84d">
+ <rect key="frame" x="0.0" y="0.0" width="103.5" height="48"/>
+ <subviews>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CZk-Q8-JqS">
+ <rect key="frame" x="0.0" y="0.0" width="48" height="48"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="48" id="Pw1-ZE-53h"/>
+ <constraint firstAttribute="height" constant="48" id="RAa-ds-3oT"/>
+ </constraints>
+ </imageView>
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="o3h-ci-LWF">
+ <rect key="frame" x="60" y="0.0" width="43.5" height="48"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CHd-h0-hPk">
+ <rect key="frame" x="0.0" y="0.0" width="43.5" height="20"/>
+ <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AVu-qV-q84">
+ <rect key="frame" x="0.0" y="32" width="43.5" height="16"/>
+ <fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ </stackView>
+ </subviews>
+ </stackView>
+ <view contentMode="scaleToFill" verticalCompressionResistancePriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="N08-my-2Lr" customClass="TagListView">
+ <rect key="frame" x="0.0" y="60" width="240" height="36.5"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <userDefinedRuntimeAttributes>
+ <userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
+ <real key="value" value="1"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="borderColor">
+ <color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="paddingY">
+ <real key="value" value="6"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="paddingX">
+ <real key="value" value="6"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="marginY">
+ <real key="value" value="7"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="number" keyPath="marginX">
+ <real key="value" value="7"/>
+ </userDefinedRuntimeAttribute>
+ <userDefinedRuntimeAttribute type="color" keyPath="textColor">
+ <color key="value" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ </userDefinedRuntimeAttribute>
+ </userDefinedRuntimeAttributes>
+ </view>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" verticalCompressionResistancePriority="752" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zZm-hh-bDO" customClass="TTTAttributedLabel">
+ <rect key="frame" x="0.0" y="108.5" width="42" height="21"/>
+ <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Uha-ow-kFJ">
+ <rect key="frame" x="0.0" y="141.5" width="240" height="256"/>
+ <constraints>
+ <constraint firstAttribute="height" priority="999" constant="256" identifier="attachHeight" id="Cuq-dQ-VYU"/>
+ </constraints>
+ </imageView>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aJE-mZ-MCS">
+ <rect key="frame" x="0.0" y="409.5" width="33" height="16"/>
+ <fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
+ <nil key="textColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ </stackView>
+ </subviews>
+ <constraints>
+ <constraint firstAttribute="bottom" secondItem="Azj-pa-GEC" secondAttribute="bottom" constant="6" id="OWY-DI-0dv"/>
+ <constraint firstItem="Azj-pa-GEC" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="6" id="Ohz-6B-bYr"/>
+ <constraint firstItem="Azj-pa-GEC" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="biD-O8-Mwb"/>
+ <constraint firstAttribute="trailing" secondItem="Azj-pa-GEC" secondAttribute="trailing" constant="6" id="ymN-qs-0pB"/>
+ </constraints>
+ </tableViewCellContentView>
+ <viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
+ <connections>
+ <outlet property="attach" destination="Uha-ow-kFJ" id="s6u-WS-Ybt"/>
+ <outlet property="attachmentHeight" destination="Cuq-dQ-VYU" id="5DR-sP-vQI"/>
+ <outlet property="avatar" destination="CZk-Q8-JqS" id="0Jh-5F-W9D"/>
+ <outlet property="summary" destination="aJE-mZ-MCS" id="lWR-A2-40d"/>
+ <outlet property="tags" destination="N08-my-2Lr" id="MwG-ij-n7e"/>
+ <outlet property="text" destination="zZm-hh-bDO" id="mqX-Cm-d4L"/>
+ <outlet property="timestamp" destination="AVu-qV-q84" id="Cyn-0y-V0R"/>
+ <outlet property="title" destination="CHd-h0-hPk" id="BuC-dv-0sU"/>
+ </connections>
+ <point key="canvasLocation" x="161" y="266"/>
+ </tableViewCell>
+ </objects>
+</document>