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.xcodeproj/project.pbxproj | 9 ++++-- Juick/Main.storyboard | 41 +++++++++++++++------------ Juick/ViewControllers/NewPostViewController.m | 6 +++- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj index 43d3b19..2230b06 100644 --- a/Juick.xcodeproj/project.pbxproj +++ b/Juick.xcodeproj/project.pbxproj @@ -916,6 +916,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = JuickPush/Info.plist; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -923,7 +924,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = YES; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,6"; }; name = Debug; }; @@ -945,6 +946,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = JuickPush/Info.plist; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -952,7 +954,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = YES; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,6"; }; name = Release; }; @@ -1055,6 +1057,7 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; INFOPLIST_FILE = JuickPush/Info.plist; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1062,7 +1065,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = YES; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,6"; }; name = "Debug (local)"; }; 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