summaryrefslogtreecommitdiff
path: root/Juick
diff options
context:
space:
mode:
Diffstat (limited to 'Juick')
-rw-r--r--Juick/ViewControllers/ThreadViewController.m36
-rw-r--r--Juick/Views/MessageCell.xib21
2 files changed, 32 insertions, 25 deletions
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 893765b..4de0cab 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -9,23 +9,20 @@
#import "ThreadViewController.h"
#import "ColorScheme.h"
#import "MessageCell.h"
+@import PHFComposeBarView;
@interface ThreadViewController ()
@property (nonatomic, readwrite, retain) UIView *inputAccessoryView;
+-(void) updateQuoteText:(Message *)message;
+
@end
@implementation ThreadViewController
- (void)viewDidLoad {
[super viewDidLoad];
-
- // Uncomment the following line to preserve selection between presentations.
- // self.clearsSelectionOnViewWillAppear = NO;
-
- // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
- // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
@@ -36,17 +33,26 @@
- (UIView *)inputAccessoryView {
if (!_inputAccessoryView) {
CGRect viewBounds = self.view.bounds;
- CGRect frame = CGRectMake(0, viewBounds.size.height - PHFComposeBarViewInitialHeight, viewBounds.size.width,
- PHFComposeBarViewInitialHeight);
- PHFComposeBarView *_view = [[PHFComposeBarView alloc] initWithFrame:frame];
- _view.backgroundColor = [UIColor whiteColor];
- _view.buttonTintColor = [ColorScheme linkColor];
- _view.maxLinesCount = 4;
- _view.utilityButtonImage = [UIImage imageNamed:@"Camera"];
- _view.delegate = self;
- _inputAccessoryView = _view;
+ CGRect frame = CGRectMake(0, viewBounds.size.height - PHFComposeBarViewInitialHeight - self.view.safeAreaInsets.top + self.view.safeAreaInsets.bottom, viewBounds.size.width, PHFComposeBarViewInitialHeight);
+ PHFComposeBarView *inputView = [[PHFComposeBarView alloc] initWithFrame:frame];
+ inputView.backgroundColor = [UIColor whiteColor];
+ inputView.buttonTintColor = [ColorScheme linkColor];
+ inputView.maxLinesCount = 4;
+ inputView.utilityButtonImage = [UIImage imageNamed:@"Camera"];
+ inputView.delegate = self;
+ _inputAccessoryView = inputView;
}
return _inputAccessoryView;
}
+-(void) updateQuoteText:(Message *)message {
+ /*MessageInputView *inputView = (MessageInputView *)self.inputAccessoryView;
+ inputView.quoteText.text = message.text;*/
+}
+
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ Message * selectedMessage = [self.messages objectAtIndex:indexPath.row];
+ [self updateQuoteText:selectedMessage];
+}
+
@end
diff --git a/Juick/Views/MessageCell.xib b/Juick/Views/MessageCell.xib
index 7a08ca9..d5fcab0 100644
--- a/Juick/Views/MessageCell.xib
+++ b/Juick/Views/MessageCell.xib
@@ -19,11 +19,11 @@
<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">
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" 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"/>
+ <rect key="frame" x="0.0" y="0.0" width="562" 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"/>
@@ -33,16 +33,16 @@
</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"/>
+ <rect key="frame" x="60" y="0.0" width="502" 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"/>
+ <rect key="frame" x="0.0" y="0.0" width="502" 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"/>
+ <rect key="frame" x="0.0" y="32" width="502" height="16"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@@ -52,7 +52,7 @@
</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"/>
+ <rect key="frame" x="0.0" y="60" width="562" height="36.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
@@ -79,19 +79,20 @@
</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"/>
+ <rect key="frame" x="0.0" y="108.5" width="562" 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"/>
+ <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Uha-ow-kFJ">
+ <rect key="frame" x="0.0" y="141.5" width="562" height="256"/>
<constraints>
<constraint firstAttribute="height" priority="999" constant="256" identifier="attachHeight" id="Cuq-dQ-VYU"/>
+ <constraint firstAttribute="width" priority="999" constant="256" id="oJg-1R-jp3"/>
</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"/>
+ <rect key="frame" x="0.0" y="409.5" width="562" height="16"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>