summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-11-19 17:11:16 +0300
committerGravatar Vitaly Takmazov2021-11-19 17:11:26 +0300
commit5a48eda1fca0f97d813ab37f7cd247fa5c87aae4 (patch)
treec1c6251137493997acbbebb88fda3835f1f7f1e8
parent605523f7a0af0fda52ca71322a7ed6e5c25ae260 (diff)
Show quote view on Catalyst
-rw-r--r--Juick.xcodeproj/project.pbxproj9
-rw-r--r--Juick/Main.storyboard41
-rw-r--r--Juick/ViewControllers/NewPostViewController.m6
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 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Rbr-km-xhI">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Rbr-km-xhI">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -20,7 +20,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="messageCell" id="6fG-tI-4kH">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="6fG-tI-4kH" id="ifl-hK-faj">
<rect key="frame" x="0.0" y="0.0" width="349.5" height="43.5"/>
@@ -49,7 +49,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="prototypeMessage" id="Orz-mD-PnE">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Orz-mD-PnE" id="WRd-ev-Osb">
<rect key="frame" x="0.0" y="0.0" width="349.5" height="43.5"/>
@@ -211,7 +211,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="profileCell" id="Tqu-K7-cUZ">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Tqu-K7-cUZ" id="7Z9-n4-t7M">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
@@ -240,7 +240,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="notificationCell" id="KSR-Fu-ZcK" userLabel=" " customClass="ConversationCell">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KSR-Fu-ZcK" id="BUc-6q-MYj">
<rect key="frame" x="0.0" y="0.0" width="349.5" height="43.5"/>
@@ -273,20 +273,25 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
- <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="XYj-Y4-lfM">
+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="1fg-29-HkG">
<rect key="frame" x="4" y="52" width="367" height="591"/>
- <color key="backgroundColor" name="TextBackground"/>
- <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
- <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
- </textView>
+ <subviews>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="XYj-Y4-lfM">
+ <rect key="frame" x="0.0" y="0.0" width="367" height="591"/>
+ <color key="backgroundColor" name="TextBackground"/>
+ <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ </textView>
+ </subviews>
+ </stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="UJz-7C-l1q"/>
<color key="backgroundColor" name="TextBackground"/>
<constraints>
- <constraint firstItem="UJz-7C-l1q" firstAttribute="top" secondItem="XYj-Y4-lfM" secondAttribute="top" constant="4" id="5aN-lI-YBC"/>
- <constraint firstItem="UJz-7C-l1q" firstAttribute="bottom" secondItem="XYj-Y4-lfM" secondAttribute="bottom" constant="4" id="7HQ-Ue-xFR"/>
- <constraint firstItem="XYj-Y4-lfM" firstAttribute="leading" secondItem="UJz-7C-l1q" secondAttribute="leading" constant="4" id="aw6-Uf-tSS"/>
- <constraint firstItem="UJz-7C-l1q" firstAttribute="trailing" secondItem="XYj-Y4-lfM" secondAttribute="trailing" constant="4" id="gTz-QO-1CL"/>
+ <constraint firstItem="UJz-7C-l1q" firstAttribute="top" secondItem="1fg-29-HkG" secondAttribute="top" constant="4" id="Fer-sZ-KfK"/>
+ <constraint firstItem="UJz-7C-l1q" firstAttribute="bottom" secondItem="1fg-29-HkG" secondAttribute="bottom" constant="4" id="PN2-VU-1Yr"/>
+ <constraint firstItem="UJz-7C-l1q" firstAttribute="trailing" secondItem="1fg-29-HkG" secondAttribute="trailing" constant="4" id="aju-fu-jaO"/>
+ <constraint firstItem="1fg-29-HkG" firstAttribute="leading" secondItem="UJz-7C-l1q" secondAttribute="leading" constant="4" id="xI5-SZ-h0q"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="Yd6-Yh-gtd">
@@ -302,7 +307,7 @@
</barButtonItem>
</navigationItem>
<connections>
- <outlet property="bottomConstraint" destination="7HQ-Ue-xFR" id="gZE-2Y-pQd"/>
+ <outlet property="stack" destination="1fg-29-HkG" id="FQQ-8z-304"/>
<outlet property="textView" destination="XYj-Y4-lfM" id="AhV-B8-GYd"/>
</connections>
</viewController>
@@ -320,7 +325,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="prototypeMessage" id="Nlo-27-7g6">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Nlo-27-7g6" id="1Ma-Fq-9gP">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
@@ -401,7 +406,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="prototypeMessage" id="DWy-O3-T1C">
- <rect key="frame" x="0.0" y="24.5" width="375" height="43.5"/>
+ <rect key="frame" x="0.0" y="44.5" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DWy-O3-T1C" id="bMl-aO-eZb">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
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";
}