summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-17 00:30:51 +0300
committerGravatar Vitaly Takmazov2018-10-17 00:30:51 +0300
commit675d2bd7c52ef0e191d52784f20f3c35e4b308f6 (patch)
tree21f3a35a9e04de4e27ea8dfee4550dd01af36272
parent6e98d48a7764c3d2a814ce70682a63d024910d17 (diff)
Layout fixes
-rw-r--r--Juick.xcodeproj/project.pbxproj12
-rw-r--r--Juick/Views/ConversationCell.m6
-rw-r--r--Juick/Views/ConversationCell.xib29
-rw-r--r--Juick/Views/MessageCell.m1
4 files changed, 23 insertions, 25 deletions
diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj
index 3b9d2fd..f06323d 100644
--- a/Juick.xcodeproj/project.pbxproj
+++ b/Juick.xcodeproj/project.pbxproj
@@ -287,23 +287,23 @@
77FFC0151D5FD13C003BD81A /* Views */ = {
isa = PBXGroup;
children = (
+ 773E63A1204BE036008B8F8D /* BubbleMessageCell.h */,
+ 773E63A2204BE036008B8F8D /* BubbleMessageCell.m */,
773E6391204BCAD6008B8F8D /* BubbleMessageCell.xib */,
+ 773E6395204BCB64008B8F8D /* ConversationCell.h */,
+ 773E6396204BCB64008B8F8D /* ConversationCell.m */,
773E6392204BCAD6008B8F8D /* ConversationCell.xib */,
776C41BA1FD3EF180063B82E /* MessageCell.h */,
776C41BB1FD3EF180063B82E /* MessageCell.m */,
776C41BC1FD3EF180063B82E /* MessageCell.xib */,
- 77E61A5A1FD467FC00B4E304 /* QuoteView.xib */,
77E61A5C1FD4682B00B4E304 /* QuoteView.h */,
77E61A5D1FD4682B00B4E304 /* QuoteView.m */,
- 773E6395204BCB64008B8F8D /* ConversationCell.h */,
- 773E6396204BCB64008B8F8D /* ConversationCell.m */,
- 773E63A1204BE036008B8F8D /* BubbleMessageCell.h */,
- 773E63A2204BE036008B8F8D /* BubbleMessageCell.m */,
+ 77E61A5A1FD467FC00B4E304 /* QuoteView.xib */,
773E63A4204BE11B008B8F8D /* FixedLabel.h */,
773E63A5204BE11B008B8F8D /* FixedLabel.m */,
- 77B8B398207A52BD005CB20C /* MessageInputView.xib */,
77B8B39A207A5629005CB20C /* MessageInputView.h */,
77B8B39B207A5629005CB20C /* MessageInputView.m */,
+ 77B8B398207A52BD005CB20C /* MessageInputView.xib */,
7761133521766A3000D350CD /* ContentLoadingCell.h */,
7761133621766A3000D350CD /* ContentLoadingCell.m */,
7761133721766A3000D350CD /* ContentLoadingCell.xib */,
diff --git a/Juick/Views/ConversationCell.m b/Juick/Views/ConversationCell.m
index 873f21e..ca09cd0 100644
--- a/Juick/Views/ConversationCell.m
+++ b/Juick/Views/ConversationCell.m
@@ -7,6 +7,7 @@
//
#import "ConversationCell.h"
+#import "ColorScheme.h"
@implementation ConversationCell
@@ -16,10 +17,9 @@
}
-(void) configureWithChat:(Chat *)chat {
+ self.chatName.textColor = [ColorScheme linkColor];
self.chatName.text = chat.uname;
- self.lastMessage.text = @"";
- self.unreadMarker.text = @"";
- __weak UIImageView *weakAvatar;
+ __weak UIImageView *weakAvatar = self.avatar;
[self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [chat.uid intValue]]]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
[UIView transitionWithView:weakAvatar
duration:0.3
diff --git a/Juick/Views/ConversationCell.xib b/Juick/Views/ConversationCell.xib
index 65f9766..09b5a7e 100644
--- a/Juick/Views/ConversationCell.xib
+++ b/Juick/Views/ConversationCell.xib
@@ -18,41 +18,38 @@
<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">
+ <stackView opaque="NO" contentMode="scaleToFill" 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"/>
+ <stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="252" verticalHuggingPriority="252" horizontalCompressionResistancePriority="749" verticalCompressionResistancePriority="752" axis="vertical" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="Sas-e1-iNF">
+ <rect key="frame" x="0.0" y="9.5" width="49.5" height="74.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"/>
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" adjustsImageSizeForAccessibilityContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WsB-eh-dhD">
+ <rect key="frame" x="1" y="0.0" width="48" height="48"/>
<constraints>
- <constraint firstAttribute="width" constant="32" id="6ox-eq-Vlp"/>
- <constraint firstAttribute="height" constant="32" id="e88-rG-unU"/>
+ <constraint firstAttribute="width" constant="48" id="6ox-eq-Vlp"/>
+ <constraint firstAttribute="height" constant="48" 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"/>
+ <rect key="frame" x="17.5" y="54" 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"/>
+ <color key="textColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<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"/>
+ <stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="252" horizontalCompressionResistancePriority="751" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="dJe-jR-n42">
+ <rect key="frame" x="61.5" y="11.5" width="404.5" 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"/>
+ <rect key="frame" x="0.0" y="0.0" width="404.5" 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"/>
+ <rect key="frame" x="0.0" y="32.5" width="404.5" 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"/>
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index efdfbc6..cf23f62 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -30,6 +30,7 @@
}
- (void) configureWithMessage:(Message *)msg {
+ self.avatar.image = nil;
__weak UIImageView *weakAvatar = self.avatar;
[self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [msg.user.uid intValue]]]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
[UIView transitionWithView:weakAvatar