From a5c35479e144eef8bea9f80a10dfeb7a860763f1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 3 Oct 2019 15:16:18 +0300 Subject: Drop PHFComposeBarView --- Juick/Views/MessageInputView.h | 9 +++++++++ Juick/Views/MessageInputView.m | 4 ++++ Juick/Views/MessageInputView.xib | 24 ++++++++++++------------ 3 files changed, 25 insertions(+), 12 deletions(-) (limited to 'Juick/Views') diff --git a/Juick/Views/MessageInputView.h b/Juick/Views/MessageInputView.h index 38ce721..c78f498 100644 --- a/Juick/Views/MessageInputView.h +++ b/Juick/Views/MessageInputView.h @@ -8,8 +8,17 @@ #import +@protocol MessageInputDelegate + +-(void) textSent:(NSString *)text; + +@end + @interface MessageInputView : UIVisualEffectView @property (strong, nonatomic) IBOutlet NSLayoutConstraint *bottomConstraint; @property (strong, nonatomic) IBOutlet UITextField *textView; +- (IBAction)sendPressed:(id)sender; + +@property (nonatomic, weak) id delegate; @end diff --git a/Juick/Views/MessageInputView.m b/Juick/Views/MessageInputView.m index ab6b3e5..c4d96de 100644 --- a/Juick/Views/MessageInputView.m +++ b/Juick/Views/MessageInputView.m @@ -15,4 +15,8 @@ [self setTintColor:[UIColor colorNamed:@"Title"]]; } +- (IBAction)sendPressed:(id)sender { + [self.delegate textSent:self.textView.text]; + self.textView.text = nil; +} @end diff --git a/Juick/Views/MessageInputView.xib b/Juick/Views/MessageInputView.xib index 240391c..9cb8bd4 100644 --- a/Juick/Views/MessageInputView.xib +++ b/Juick/Views/MessageInputView.xib @@ -1,41 +1,41 @@ - - - - + + - + - + - + - + - - + -- cgit v1.2.3