From 6f8855ce3b83cc50583b62b4a1960c27fdf66bb3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 8 Apr 2018 16:36:46 +0300 Subject: QuoteView --- Juick.xcodeproj/project.pbxproj | 20 ++++++------ Juick/ViewControllers/NewPostViewController.m | 6 ++-- Juick/Views/MessageInputView.h | 13 -------- Juick/Views/MessageInputView.m | 18 ----------- Juick/Views/MessageInputView.xib | 44 --------------------------- Juick/Views/QuoteView.h | 13 ++++++++ Juick/Views/QuoteView.m | 18 +++++++++++ Juick/Views/QuoteView.xib | 44 +++++++++++++++++++++++++++ 8 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 Juick/Views/MessageInputView.h delete mode 100644 Juick/Views/MessageInputView.m delete mode 100644 Juick/Views/MessageInputView.xib create mode 100644 Juick/Views/QuoteView.h create mode 100644 Juick/Views/QuoteView.m create mode 100644 Juick/Views/QuoteView.xib diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj index 58ec2b6..736ec50 100644 --- a/Juick.xcodeproj/project.pbxproj +++ b/Juick.xcodeproj/project.pbxproj @@ -54,8 +54,8 @@ 77C6ADDE1F770EB2000AEA8C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77C6ADDD1F770EB2000AEA8C /* Main.storyboard */; }; 77C6ADE41F7717BC000AEA8C /* ThreadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77C6ADE31F7717BC000AEA8C /* ThreadViewController.m */; }; 77E35A82189A5B5A00B2D216 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E35A81189A5B5A00B2D216 /* LoginViewController.m */; }; - 77E61A5B1FD467FC00B4E304 /* MessageInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77E61A5A1FD467FC00B4E304 /* MessageInputView.xib */; }; - 77E61A5E1FD4682B00B4E304 /* MessageInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E61A5D1FD4682B00B4E304 /* MessageInputView.m */; }; + 77E61A5B1FD467FC00B4E304 /* QuoteView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77E61A5A1FD467FC00B4E304 /* QuoteView.xib */; }; + 77E61A5E1FD4682B00B4E304 /* QuoteView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E61A5D1FD4682B00B4E304 /* QuoteView.m */; }; 77FCADDF1D6A50DA00CBA649 /* APIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 77FCADDE1D6A50DA00CBA649 /* APIClient.m */; }; /* End PBXBuildFile section */ @@ -143,9 +143,9 @@ 77C6ADE31F7717BC000AEA8C /* ThreadViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ThreadViewController.m; sourceTree = ""; }; 77E35A80189A5B5A00B2D216 /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = ""; }; 77E35A81189A5B5A00B2D216 /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = ""; }; - 77E61A5A1FD467FC00B4E304 /* MessageInputView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageInputView.xib; sourceTree = ""; }; - 77E61A5C1FD4682B00B4E304 /* MessageInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageInputView.h; sourceTree = ""; }; - 77E61A5D1FD4682B00B4E304 /* MessageInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageInputView.m; sourceTree = ""; }; + 77E61A5A1FD467FC00B4E304 /* QuoteView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = QuoteView.xib; sourceTree = ""; }; + 77E61A5C1FD4682B00B4E304 /* QuoteView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuoteView.h; sourceTree = ""; }; + 77E61A5D1FD4682B00B4E304 /* QuoteView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QuoteView.m; sourceTree = ""; }; 77FCADDE1D6A50DA00CBA649 /* APIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIClient.m; sourceTree = ""; }; 77FCADE01D6A50EC00CBA649 /* APIClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APIClient.h; sourceTree = ""; }; 9FF4AA695CB46B0E7AED628D /* Pods_JuickTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JuickTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -338,9 +338,9 @@ 776C41BA1FD3EF180063B82E /* MessageCell.h */, 776C41BB1FD3EF180063B82E /* MessageCell.m */, 776C41BC1FD3EF180063B82E /* MessageCell.xib */, - 77E61A5A1FD467FC00B4E304 /* MessageInputView.xib */, - 77E61A5C1FD4682B00B4E304 /* MessageInputView.h */, - 77E61A5D1FD4682B00B4E304 /* MessageInputView.m */, + 77E61A5A1FD467FC00B4E304 /* QuoteView.xib */, + 77E61A5C1FD4682B00B4E304 /* QuoteView.h */, + 77E61A5D1FD4682B00B4E304 /* QuoteView.m */, 773E6395204BCB64008B8F8D /* ConversationCell.h */, 773E6396204BCB64008B8F8D /* ConversationCell.m */, 773E63A1204BE036008B8F8D /* BubbleMessageCell.h */, @@ -460,7 +460,7 @@ 773F231C1F76DD0B00B5B0DF /* SerpentineBoldItalic.ttf in Resources */, 77317BB6181BBE8500D60005 /* InfoPlist.strings in Resources */, 773F23331F76ECAC00B5B0DF /* LaunchScreen.storyboard in Resources */, - 77E61A5B1FD467FC00B4E304 /* MessageInputView.xib in Resources */, + 77E61A5B1FD467FC00B4E304 /* QuoteView.xib in Resources */, 773E6394204BCAD6008B8F8D /* ConversationCell.xib in Resources */, 773E6393204BCAD6008B8F8D /* BubbleMessageCell.xib in Resources */, ); @@ -538,7 +538,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 77E61A5E1FD4682B00B4E304 /* MessageInputView.m in Sources */, + 77E61A5E1FD4682B00B4E304 /* QuoteView.m in Sources */, 77317BBC181BBE8500D60005 /* AppDelegate.m in Sources */, 776C41C11FD3FF6E0063B82E /* DiscoverViewController.m in Sources */, 77FCADDF1D6A50DA00CBA649 /* APIClient.m in Sources */, diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m index 81121ec..3e2d17e 100644 --- a/Juick/ViewControllers/NewPostViewController.m +++ b/Juick/ViewControllers/NewPostViewController.m @@ -9,7 +9,7 @@ #import "NewPostViewController.h" #import "MessagesViewController.h" #import "ColorScheme.h" -#import "MessageInputView.h" +#import "QuoteView.h" #import "APIClient.h" @interface NewPostViewController () @@ -29,7 +29,7 @@ self.paddingValue = self.bottomConstraint.constant; [self.view setBackgroundColor:[ColorScheme mainBackground]]; if (_replyTo != nil) { - MessageInputView *inputView = (MessageInputView *) self.inputAccessoryView; + QuoteView *inputView = (QuoteView *) self.inputAccessoryView; inputView.quoteText.text = _replyTo.text; self.title = [NSString stringWithFormat:@"Reply to %@", _replyTo.user.uname]; } else { @@ -73,7 +73,7 @@ - (UIView *) inputAccessoryView { if (!_inputAccessoryView) { - MessageInputView *inputView = (MessageInputView *)[[[NSBundle mainBundle] loadNibNamed:@"MessageInputView" owner:self options:nil] firstObject]; + QuoteView *inputView = (QuoteView *)[[[NSBundle mainBundle] loadNibNamed:@"QuoteView" owner:self options:nil] firstObject]; inputView.autoresizingMask = UIViewAutoresizingFlexibleHeight; inputView.quoteText.text = self.replyTo.text; _inputAccessoryView = inputView; diff --git a/Juick/Views/MessageInputView.h b/Juick/Views/MessageInputView.h deleted file mode 100644 index cfdcea6..0000000 --- a/Juick/Views/MessageInputView.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// MessageInputView.h -// Juick -// -// Created by Vitaly Takmazov on 03/12/2017. -// Copyright © 2017 com.juick. All rights reserved. -// - -#import - -@interface MessageInputView : UIVisualEffectView -@property (weak, nonatomic) IBOutlet UILabel *quoteText; -@end diff --git a/Juick/Views/MessageInputView.m b/Juick/Views/MessageInputView.m deleted file mode 100644 index 24c8b41..0000000 --- a/Juick/Views/MessageInputView.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// MessageInputView.m -// Juick -// -// Created by Vitaly Takmazov on 03/12/2017. -// Copyright © 2017 com.juick. All rights reserved. -// - -#import "MessageInputView.h" -#import "ColorScheme.h" -@implementation MessageInputView - --(void) awakeFromNib { - [super awakeFromNib]; - self.contentView.backgroundColor = [ColorScheme headerBackground]; -} - -@end diff --git a/Juick/Views/MessageInputView.xib b/Juick/Views/MessageInputView.xib deleted file mode 100644 index 0b2af25..0000000 --- a/Juick/Views/MessageInputView.xib +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Juick/Views/QuoteView.h b/Juick/Views/QuoteView.h new file mode 100644 index 0000000..affc7ee --- /dev/null +++ b/Juick/Views/QuoteView.h @@ -0,0 +1,13 @@ +// +// MessageInputView.h +// Juick +// +// Created by Vitaly Takmazov on 03/12/2017. +// Copyright © 2017 com.juick. All rights reserved. +// + +#import + +@interface QuoteView : UIVisualEffectView +@property (weak, nonatomic) IBOutlet UILabel *quoteText; +@end diff --git a/Juick/Views/QuoteView.m b/Juick/Views/QuoteView.m new file mode 100644 index 0000000..bb9cd75 --- /dev/null +++ b/Juick/Views/QuoteView.m @@ -0,0 +1,18 @@ +// +// MessageInputView.m +// Juick +// +// Created by Vitaly Takmazov on 03/12/2017. +// Copyright © 2017 com.juick. All rights reserved. +// + +#import "QuoteView.h" +#import "ColorScheme.h" +@implementation QuoteView + +-(void) awakeFromNib { + [super awakeFromNib]; + self.contentView.backgroundColor = [ColorScheme headerBackground]; +} + +@end diff --git a/Juick/Views/QuoteView.xib b/Juick/Views/QuoteView.xib new file mode 100644 index 0000000..96a03fe --- /dev/null +++ b/Juick/Views/QuoteView.xib @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3