From 5a48eda1fca0f97d813ab37f7cd247fa5c87aae4 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 19 Nov 2021 17:11:16 +0300 Subject: Show quote view on Catalyst --- Juick/Main.storyboard | 41 +++++++++++++++------------ Juick/ViewControllers/NewPostViewController.m | 6 +++- 2 files changed, 28 insertions(+), 19 deletions(-) (limited to 'Juick') diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard index 4c2b0b4..dc9d8ae 100644 --- a/Juick/Main.storyboard +++ b/Juick/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -20,7 +20,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -273,20 +273,25 @@ - + - - - - + + + + + + + + + - - - - + + + + @@ -302,7 +307,7 @@ - + @@ -320,7 +325,7 @@ - + @@ -401,7 +406,7 @@ - + diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m index 03a27e3..1b655f6 100644 --- a/Juick/ViewControllers/NewPostViewController.m +++ b/Juick/ViewControllers/NewPostViewController.m @@ -20,6 +20,7 @@ NSString * const ReplyPostedNotificationName = @"ReplyPosted"; @property (nonatomic, assign) int paddingValue; @property (nonatomic, readwrite, retain) UIView *inputAccessoryView; +@property (weak, nonatomic) IBOutlet UIStackView *stack; @end @@ -30,9 +31,12 @@ NSString * const ReplyPostedNotificationName = @"ReplyPosted"; [super viewDidLoad]; self.paddingValue = self.bottomConstraint.constant; if (_replyTo != nil) { - QuoteView *inputView = (QuoteView *) self.inputAccessoryView; + QuoteView *inputView = (QuoteView *) self.inputAccessoryView; inputView.quoteText.text = _replyTo.text; self.title = [NSString stringWithFormat:@"Reply to %@", _replyTo.user.uname]; +#if TARGET_OS_MACCATALYST + [self.stack addArrangedSubview:[self inputAccessoryView]]; +#endif } else { self.title = @"Post"; } -- cgit v1.2.3