summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/MessageCell.h2
-rw-r--r--Juick/Views/MessageCell.m4
-rw-r--r--Juick/Views/MessageCell.xib10
3 files changed, 9 insertions, 7 deletions
diff --git a/Juick/Views/MessageCell.h b/Juick/Views/MessageCell.h
index 684a620..d50751b 100644
--- a/Juick/Views/MessageCell.h
+++ b/Juick/Views/MessageCell.h
@@ -26,5 +26,5 @@
@property (nonatomic, strong) id<MessageCellDelegate> delegate;
-- (void) configureWithMessage:(Message *)msg;
+- (void) configureWithMessage:(Message *)msg selectable:(BOOL)selectable;
@end
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index ad1a3a3..f02aa48 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -46,7 +46,7 @@ const NSString *unreadMarker = @"●";
_italicFont = [UIFont fontWithDescriptor:italicFontDescriptor size: 0.0];
}
-- (void) configureWithMessage:(Message *)msg {
+- (void) configureWithMessage:(Message *)msg selectable:(BOOL)selectable {
self.avatar.image = nil;
__weak UIImageView *weakAvatar = self.avatar;
[[AppDelegate shared].api fetchImageWithURL:[NSURL URLWithString:msg.user.avatar] callback:^(NSData *data) {
@@ -101,6 +101,8 @@ const NSString *unreadMarker = @"●";
self.text.attributedText = nil;
if (msg.text) {
[self.text setHidden:NO];
+ [self.text setSelectable:selectable];
+ [self.text setUserInteractionEnabled:selectable];
NSMutableAttributedString *txt = [[NSMutableAttributedString alloc]
initWithString:msg.text
attributes:@{NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody],
diff --git a/Juick/Views/MessageCell.xib b/Juick/Views/MessageCell.xib
index 5b5ebd3..e690318 100644
--- a/Juick/Views/MessageCell.xib
+++ b/Juick/Views/MessageCell.xib
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<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="none" indentationWidth="10" reuseIdentifier="messageCell" rowHeight="604" id="KGk-i7-Jjw" customClass="MessageCell">
+ <tableViewCell contentMode="scaleToFill" selectionStyle="gray" indentationWidth="10" reuseIdentifier="messageCell" rowHeight="604" id="KGk-i7-Jjw" customClass="MessageCell">
<rect key="frame" x="0.0" y="0.0" width="572" height="604"/>
<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">
@@ -49,9 +49,9 @@
</stackView>
</subviews>
</stackView>
- <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="749" scrollEnabled="NO" editable="NO" textAlignment="natural" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nZn-a4-oSt">
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" verticalHuggingPriority="1000" verticalCompressionResistancePriority="749" scrollEnabled="NO" editable="NO" textAlignment="natural" adjustsFontForContentSizeCategory="YES" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZn-a4-oSt">
<rect key="frame" x="0.0" y="104" width="560" height="192"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>