diff options
author | Vitaly Takmazov | 2020-05-15 14:13:39 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-05-15 14:13:39 +0300 |
commit | cefb229ce61ed1bf26b377e969b6ba34e3fd5abb (patch) | |
tree | a651d1ef865a4bc65e9e87a41a071037efec8d34 | |
parent | 4e1d4ecc574fb8f8e0643427a2b6b0ec14672d04 (diff) |
Transparent text editor
-rw-r--r-- | Juick/Colors.xcassets/TextBackground.colorset/Contents.json | 38 | ||||
-rw-r--r-- | Juick/Main.storyboard | 17 | ||||
-rw-r--r-- | Juick/ViewControllers/NewPostViewController.m | 1 |
3 files changed, 43 insertions, 13 deletions
diff --git a/Juick/Colors.xcassets/TextBackground.colorset/Contents.json b/Juick/Colors.xcassets/TextBackground.colorset/Contents.json new file mode 100644 index 0000000..57e2586 --- /dev/null +++ b/Juick/Colors.xcassets/TextBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.750", + "blue" : "0.996", + "green" : "0.992", + "red" : "0.992" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.750", + "blue" : "0.133", + "green" : "0.133", + "red" : "0.133" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard index 5fc9a0e..026665b 100644 --- a/Juick/Main.storyboard +++ b/Juick/Main.storyboard @@ -236,22 +236,12 @@ <subviews> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="XYj-Y4-lfM"> <rect key="frame" x="4" y="52" width="367" height="591"/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="backgroundColor" name="TextBackground"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> - <userDefinedRuntimeAttributes> - <userDefinedRuntimeAttribute type="color" keyPath="layer.shadowColor"> - <color key="value" white="0.0" alpha="1" colorSpace="calibratedWhite"/> - </userDefinedRuntimeAttribute> - <userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="NO"/> - <userDefinedRuntimeAttribute type="string" keyPath="layer.shadowOpacity" value="0.16"/> - <userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset"> - <size key="value" width="0.0" height="3"/> - </userDefinedRuntimeAttribute> - </userDefinedRuntimeAttributes> </textView> </subviews> - <color key="backgroundColor" red="0.97254901960784312" green="0.97254901960784312" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/> + <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"/> @@ -452,6 +442,9 @@ <namedColor name="Chat"> <color red="0.97254901960784312" green="0.97254901960784312" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </namedColor> + <namedColor name="TextBackground"> + <color red="0.99215686274509807" green="0.99215686274509807" blue="0.99607843137254903" alpha="0.33695653080940247" colorSpace="custom" customColorSpace="sRGB"/> + </namedColor> <namedColor name="Title"> <color red="0.23529411764705882" green="0.46666666666666667" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </namedColor> diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m index 344e7b9..8e61006 100644 --- a/Juick/ViewControllers/NewPostViewController.m +++ b/Juick/ViewControllers/NewPostViewController.m @@ -28,7 +28,6 @@ NSString * const ReplyPostedNotificationName = @"ReplyPosted"; { [super viewDidLoad]; self.paddingValue = self.bottomConstraint.constant; - [self.view setBackgroundColor:[UIColor colorNamed:@"Background"]]; if (_replyTo != nil) { QuoteView *inputView = (QuoteView *) self.inputAccessoryView; inputView.quoteText.text = _replyTo.text; |