From ccf06c2af74f63e5276e15f3e10acf74bf4174f7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 3 Dec 2017 20:12:08 +0300 Subject: WIP --- Juick.xcodeproj/project.pbxproj | 4 ++-- Juick/ViewControllers/ThreadViewController.m | 36 ++++++++++++++++------------ Juick/Views/MessageCell.xib | 21 ++++++++-------- Podfile | 2 +- Podfile.lock | 2 +- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj index f97e69d..38a14a7 100644 --- a/Juick.xcodeproj/project.pbxproj +++ b/Juick.xcodeproj/project.pbxproj @@ -685,7 +685,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Juick/Supporting Files/Juick-Prefix.pch"; INFOPLIST_FILE = "Juick/Supporting Files/Juick-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; PRODUCT_BUNDLE_IDENTIFIER = "com.juick.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -705,7 +705,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Juick/Supporting Files/Juick-Prefix.pch"; INFOPLIST_FILE = "Juick/Supporting Files/Juick-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.3; + IPHONEOS_DEPLOYMENT_TARGET = 11.1; PRODUCT_BUNDLE_IDENTIFIER = "com.juick.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; 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 @@ - + - + @@ -33,16 +33,16 @@ - + - + @@ -79,19 +79,20 @@ - - + + +