diff options
author | Aleksey Belouosv <aleksey@maps.me> | 2019-03-01 15:34:06 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexzatsepin@users.noreply.github.com> | 2019-03-13 12:57:30 +0300 |
commit | 8771c0fbcba596d3f1c96a0e9331ae032268abc0 (patch) | |
tree | 0df99a0a04563fd487544a3e1d61303c3b8694a2 /iphone | |
parent | 2b4bde05b635ce7693a85cbb91869721a8bc0b81 (diff) |
[iOS] fix sharing screent in night mode
https://jira.mail.ru/browse/MAPSME-9870
Diffstat (limited to 'iphone')
8 files changed, 49 insertions, 25 deletions
diff --git a/iphone/Maps/Bookmarks/Categories/Sharing/BookmarksSharingFlow.storyboard b/iphone/Maps/Bookmarks/Categories/Sharing/BookmarksSharingFlow.storyboard index 209bc64140..b00e2bb998 100644 --- a/iphone/Maps/Bookmarks/Categories/Sharing/BookmarksSharingFlow.storyboard +++ b/iphone/Maps/Bookmarks/Categories/Sharing/BookmarksSharingFlow.storyboard @@ -52,11 +52,17 @@ <constraint firstAttribute="height" constant="24" id="4Ee-n2-9vE"/> <constraint firstAttribute="width" constant="24" id="cE0-J8-T89"/> </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ept-QQ-o9W"> <rect key="frame" x="335" y="16" width="24" height="24"/> <color key="tintColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="Button" image="ic24PxShare"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + </userDefinedRuntimeAttributes> <connections> <action selector="shareButtonPressed:" destination="90b-ef-VUJ" eventType="touchUpInside" id="D5v-pl-bJ3"/> </connections> @@ -184,11 +190,17 @@ <constraint firstAttribute="height" constant="24" id="9r2-mf-DsT"/> <constraint firstAttribute="width" constant="24" id="Gon-Yr-8Fq"/> </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PYo-PL-9Fc"> <rect key="frame" x="335" y="16" width="24" height="24"/> <color key="tintColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <state key="normal" title="Button" image="ic24PxShare"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + </userDefinedRuntimeAttributes> <connections> <action selector="shareButtonPressed:" destination="YW0-jq-Isw" eventType="touchUpInside" id="j1d-qF-UIt"/> </connections> @@ -236,6 +248,7 @@ <userDefinedRuntimeAttribute type="rect" keyPath="textContainerInset"> <rect key="value" x="0.0" y="0.0" width="0.0" height="0.0"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> </userDefinedRuntimeAttributes> </textView> </subviews> @@ -290,7 +303,7 @@ </tableViewSection> <tableViewSection headerTitle="Web editor" id="Ycc-hd-WDM"> <cells> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="129" id="wRG-8I-r2U"> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="129" id="wRG-8I-r2U" customClass="MWMTableViewCell"> <rect key="frame" x="0.0" y="515.5" width="375" height="129"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="wRG-8I-r2U" id="BPo-ON-rJH"> @@ -904,7 +917,7 @@ upload photos and more</string> The name shouldn't contain special symbols or digits. The name shouldn't be 'My places'</string> <cells> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="L0q-Dk-RQu"> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="L0q-Dk-RQu" customClass="MWMTableViewCell"> <rect key="frame" x="0.0" y="55.5" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="L0q-Dk-RQu" id="ny0-9t-pzR"> @@ -916,6 +929,10 @@ The name shouldn't contain special symbols or digits. The name shouldn't be 'My <nil key="textColor"/> <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="16"/> <textInputTraits key="textInputTraits"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + </userDefinedRuntimeAttributes> <connections> <action selector="onEditName:" destination="cvj-kq-BmC" eventType="editingChanged" id="pfy-5S-MSz"/> <outlet property="delegate" destination="cvj-kq-BmC" id="1L3-Mb-fvM"/> @@ -965,7 +982,7 @@ The name shouldn't contain special symbols or digits. The name shouldn't be 'My <sections> <tableViewSection headerTitle="Enter description" footerTitle="Guide description should contain at least 30 symbols (13 for oriental languages)." id="C3r-nD-p7y"> <cells> - <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="160" id="NR5-qU-x6v"> + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="160" id="NR5-qU-x6v" customClass="MWMTableViewCell"> <rect key="frame" x="0.0" y="55.5" width="375" height="160"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="NR5-qU-x6v" id="gPI-nK-hOK"> @@ -981,6 +998,9 @@ The name shouldn't contain special symbols or digits. The name shouldn't be 'My <userDefinedRuntimeAttribute type="number" keyPath="textContainer.lineFragmentPadding"> <integer key="value" value="0"/> </userDefinedRuntimeAttribute> + <userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/> + <userDefinedRuntimeAttribute type="string" keyPath="tintColorName" value="linkBlue"/> + <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/> </userDefinedRuntimeAttributes> <connections> <outlet property="delegate" destination="Stq-Tq-XqB" id="vUs-Qc-Ooa"/> diff --git a/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebAlertViewController.xib b/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebAlertViewController.xib index d2fff44f92..3f1e57a84c 100644 --- a/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebAlertViewController.xib +++ b/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebAlertViewController.xib @@ -109,6 +109,9 @@ </constraints> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/> + </userDefinedRuntimeAttributes> <point key="canvasLocation" x="128.80000000000001" y="-31.03448275862069"/> </view> </objects> diff --git a/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebViewController.swift b/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebViewController.swift index fb33130228..308326b603 100644 --- a/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebViewController.swift +++ b/iphone/Maps/Bookmarks/Categories/Sharing/EditOnWebViewController.swift @@ -33,6 +33,10 @@ final class EditOnWebViewController: MWMViewController { return false } + override var preferredStatusBarStyle: UIStatusBarStyle { + return UIColor.isNightMode() ? .lightContent : .default + } + @IBAction func sendMeLinkButtonPressed(_ sender: Any) { Statistics.logEvent(kStatEditOnWebClick, withParameters: [kStatItem : kStatCopyLink]) switch category.accessStatus { diff --git a/iphone/Maps/Bookmarks/Categories/Sharing/UploadActionCell.swift b/iphone/Maps/Bookmarks/Categories/Sharing/UploadActionCell.swift index 6a10c67911..55b65df97e 100644 --- a/iphone/Maps/Bookmarks/Categories/Sharing/UploadActionCell.swift +++ b/iphone/Maps/Bookmarks/Categories/Sharing/UploadActionCell.swift @@ -14,11 +14,7 @@ final class UploadActionCell: MWMTableViewCell { @IBOutlet private weak var actionImage: UIImageView! @IBOutlet private weak var actionTitle: UILabel! @IBOutlet private weak var shareButton: UIButton! - @IBOutlet private weak var progressView: UIView! { - didSet { - progressView.tintColor = UIColor.linkBlue() - } - } + @IBOutlet private weak var progressView: UIView! weak var delegate: UploadActionCellDelegate? private var titles: [UploadActionCellState : String]? diff --git a/iphone/Maps/Categories/UIView+RuntimeAttributes.h b/iphone/Maps/Categories/UIView+RuntimeAttributes.h index 03730807c0..fb06047f55 100644 --- a/iphone/Maps/Categories/UIView+RuntimeAttributes.h +++ b/iphone/Maps/Categories/UIView+RuntimeAttributes.h @@ -1,7 +1,5 @@ #import <UIKit/UIKit.h> -@interface UIView (RuntimeAttributes) - -- (void)setBackgroundColorName:(NSString *)colorName; +@interface UIView (RuntimeAttributes) @end diff --git a/iphone/Maps/Categories/UIView+RuntimeAttributes.m b/iphone/Maps/Categories/UIView+RuntimeAttributes.m new file mode 100644 index 0000000000..4b114ee1f0 --- /dev/null +++ b/iphone/Maps/Categories/UIView+RuntimeAttributes.m @@ -0,0 +1,13 @@ +#import "UIView+RuntimeAttributes.h" + +@implementation UIView (RuntimeAttributes) + +- (void)setBackgroundColorName:(NSString *)colorName { + self.backgroundColor = [UIColor colorWithName:colorName]; +} + +- (void)setTintColorName:(NSString *)colorName { + self.tintColor = [UIColor colorWithName:colorName]; +} + +@end diff --git a/iphone/Maps/Categories/UIView+RuntimeAttributes.mm b/iphone/Maps/Categories/UIView+RuntimeAttributes.mm deleted file mode 100644 index da1e96a6dd..0000000000 --- a/iphone/Maps/Categories/UIView+RuntimeAttributes.mm +++ /dev/null @@ -1,10 +0,0 @@ -#import "UIView+RuntimeAttributes.h" - -@implementation UIView (RuntimeAttributes) - -- (void)setBackgroundColorName:(NSString *)colorName -{ - self.backgroundColor = [UIColor colorWithName:colorName]; -} - -@end diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 3e7c5ce610..994e787c7e 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -131,7 +131,7 @@ 3454D7DD1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B11E07F045004AF2AD /* UISwitch+RuntimeAttributes.m */; }; 3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B31E07F045004AF2AD /* UITextField+RuntimeAttributes.mm */; }; 3454D7E31E07F045004AF2AD /* UITextView+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.mm */; }; - 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.mm */; }; + 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */; }; 34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34574A651E3B85F80061E839 /* ThemeManager.swift */; }; 3457C4261F680F1900028233 /* String+BoundingRect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3457C4241F680F1900028233 /* String+BoundingRect.swift */; }; 345C2F8A1F86361B009DB8B4 /* MWMUGCViewModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345C2F881F86361B009DB8B4 /* MWMUGCViewModel.mm */; }; @@ -999,7 +999,7 @@ 3454D7B41E07F045004AF2AD /* UITextView+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITextView+RuntimeAttributes.h"; sourceTree = "<group>"; }; 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UITextView+RuntimeAttributes.mm"; sourceTree = "<group>"; }; 3454D7B61E07F045004AF2AD /* UIView+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+RuntimeAttributes.h"; sourceTree = "<group>"; }; - 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIView+RuntimeAttributes.mm"; sourceTree = "<group>"; }; + 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+RuntimeAttributes.m"; sourceTree = "<group>"; }; 34570A3A1B13222600E6D4FD /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 34574A651E3B85F80061E839 /* ThemeManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = "<group>"; }; 3457C4241F680F1900028233 /* String+BoundingRect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+BoundingRect.swift"; sourceTree = "<group>"; }; @@ -2695,7 +2695,7 @@ 3404164A1E7BF42D00E2B6D6 /* UIView+Coordinates.swift */, 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */, 3454D7B61E07F045004AF2AD /* UIView+RuntimeAttributes.h */, - 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.mm */, + 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.m */, 340416461E7BF28E00E2B6D6 /* UIView+Snapshot.swift */, 349D1CE21E3F836900A878FD /* UIViewController+Hierarchy.swift */, 34F7422F1E0834F400AC1FD6 /* UIViewController+Navigation.h */, @@ -4958,7 +4958,7 @@ F6E2FD651E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */, F6E2FF2D1E097BA00083EBEC /* MWMSearchCell.mm in Sources */, 3454D7C51E07F045004AF2AD /* UIButton+Orientation.mm in Sources */, - 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */, + 3454D7E61E07F045004AF2AD /* UIView+RuntimeAttributes.m in Sources */, 34AB66831FC5AA330078E451 /* NavigationAddPointToastView.swift in Sources */, F6E2FE4C1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, |