diff options
author | VladiMihaylenko <vxmihaylenko@gmail.com> | 2016-02-09 15:14:05 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:17:01 +0300 |
commit | 00bf8b26c01a19009cee1cbae02414f215d29264 (patch) | |
tree | 0df65a16891220547bf7b90b34cdeeedd5062643 | |
parent | 0fa3f58eaf902747d1d002a558e0d6a6fd94a1f1 (diff) |
[ios] Fixed editor's UI bugs.
5 files changed, 28 insertions, 9 deletions
diff --git a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.xib b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.xib index 63c77dde26..93c5284483 100644 --- a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.xib +++ b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.xib @@ -35,9 +35,8 @@ <userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth"> <integer key="value" value="1"/> </userDefinedRuntimeAttribute> - <userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="white"/> + <userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/> <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="clearColor"/> - <userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlue"/> </userDefinedRuntimeAttributes> <connections> <action selector="addScheduleTap" destination="KGk-i7-Jjw" eventType="touchUpInside" id="u6e-fL-daC"/> diff --git a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.mm b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.mm index 8042ba1852..27cfde33b8 100644 --- a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.mm +++ b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.mm @@ -1,13 +1,26 @@ #import "MWMOpeningHoursAllDayTableViewCell.h" +#import "UIColor+MapsMeColor.h" @interface MWMOpeningHoursAllDayTableViewCell () @property (weak, nonatomic) IBOutlet UISwitch * switcher; +@property (weak, nonatomic) IBOutlet UILabel * label; @end @implementation MWMOpeningHoursAllDayTableViewCell +- (void)awakeFromNib +{ + [super awakeFromNib]; + [self setupLabelColor]; +} + +- (void)setupLabelColor +{ + self.label.textColor = self.switcher.on ? [UIColor blackPrimaryText] : [UIColor blackHintText]; +} + + (CGFloat)heightForWidth:(CGFloat)width { return 44.0; @@ -24,6 +37,7 @@ - (IBAction)onSwitch { self.section.allDay = self.switcher.on; + [self setupLabelColor]; } @end diff --git a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.xib b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.xib index 74a25f829a..69e748a2eb 100644 --- a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.xib +++ b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursAllDayTableViewCell.xib @@ -64,6 +64,7 @@ <userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/> </userDefinedRuntimeAttributes> <connections> + <outlet property="label" destination="0Ni-TD-6Ia" id="zLO-3p-8E4"/> <outlet property="switcher" destination="0BP-HJ-Tdq" id="mHZ-4O-ve2"/> </connections> </tableViewCell> diff --git a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursDaysSelectorTableViewCell.xib b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursDaysSelectorTableViewCell.xib index 2a81c2a247..680c6c37b0 100644 --- a/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursDaysSelectorTableViewCell.xib +++ b/iphone/Maps/Classes/Editor/OpeningHours/Cells/MWMOpeningHoursDaysSelectorTableViewCell.xib @@ -338,6 +338,15 @@ <userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/> </userDefinedRuntimeAttributes> </imageView> + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="131-Pr-FGS"> + <rect key="frame" x="0.0" y="0.0" width="320" height="1"/> + <constraints> + <constraint firstAttribute="height" constant="1" id="qnM-sM-4SM"/> + </constraints> + <userDefinedRuntimeAttributes> + <userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/> + </userDefinedRuntimeAttributes> + </imageView> </subviews> <constraints> <constraint firstItem="Tqf-QU-RCZ" firstAttribute="leading" secondItem="15A-tH-C45" secondAttribute="trailing" id="1zj-Fh-hEJ"/> @@ -352,6 +361,7 @@ <constraint firstItem="Tqf-QU-RCZ" firstAttribute="width" secondItem="lBL-06-25g" secondAttribute="width" id="EOh-Xy-asn"/> <constraint firstAttribute="bottom" secondItem="8q8-c5-QBM" secondAttribute="bottom" id="FeI-Xq-7qp"/> <constraint firstItem="CCr-vZ-lZV" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="LMf-O6-0za"/> + <constraint firstItem="131-Pr-FGS" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="MWV-1b-VBO"/> <constraint firstAttribute="bottom" secondItem="lBL-06-25g" secondAttribute="bottom" id="Mif-uK-Glu"/> <constraint firstItem="8q8-c5-QBM" firstAttribute="leading" secondItem="J8L-sr-yWu" secondAttribute="trailing" id="OhY-sz-5EG"/> <constraint firstAttribute="bottom" secondItem="Tqf-QU-RCZ" secondAttribute="bottom" id="PLc-Et-DgL"/> @@ -363,12 +373,14 @@ <constraint firstItem="i4V-yS-NEg" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="dCf-tV-y5Z"/> <constraint firstAttribute="bottom" secondItem="J8L-sr-yWu" secondAttribute="bottom" id="eO5-aC-qFU"/> <constraint firstItem="15A-tH-C45" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="gOd-8i-R7q"/> + <constraint firstAttribute="trailing" secondItem="131-Pr-FGS" secondAttribute="trailing" id="gne-P8-mu2"/> <constraint firstItem="15A-tH-C45" firstAttribute="leading" secondItem="8q8-c5-QBM" secondAttribute="trailing" id="hBC-FV-co6"/> <constraint firstItem="CCr-vZ-lZV" firstAttribute="width" secondItem="d7U-Vz-ZXn" secondAttribute="width" id="hnc-hx-D5T"/> <constraint firstItem="J8L-sr-yWu" firstAttribute="leading" secondItem="d7U-Vz-ZXn" secondAttribute="trailing" id="jbs-xW-KED"/> <constraint firstItem="d7U-Vz-ZXn" firstAttribute="width" secondItem="J8L-sr-yWu" secondAttribute="width" id="n3E-ch-hIY"/> <constraint firstAttribute="bottom" secondItem="d7U-Vz-ZXn" secondAttribute="bottom" id="r4p-8g-HHw"/> <constraint firstItem="8q8-c5-QBM" firstAttribute="width" secondItem="15A-tH-C45" secondAttribute="width" id="tLl-N7-MHZ"/> + <constraint firstItem="131-Pr-FGS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="wM0-sy-1Sy"/> <constraint firstItem="J8L-sr-yWu" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="y7s-Ip-YCm"/> <constraint firstAttribute="bottom" secondItem="CCr-vZ-lZV" secondAttribute="bottom" id="zPu-9q-ZMS"/> </constraints> diff --git a/iphone/Maps/Classes/Editor/OpeningHours/MWMOpeningHoursSection.mm b/iphone/Maps/Classes/Editor/OpeningHours/MWMOpeningHoursSection.mm index fbdc0cc874..388126887f 100644 --- a/iphone/Maps/Classes/Editor/OpeningHours/MWMOpeningHoursSection.mm +++ b/iphone/Maps/Classes/Editor/OpeningHours/MWMOpeningHoursSection.mm @@ -276,13 +276,6 @@ using namespace osmoh; for (NSUInteger row = minRows; row < maxRows; ++row) [indexes addObject:[NSIndexPath indexPathForRow:row inSection:self.index]]; - NSUInteger const reloadRow = [self firstRowForKey:MWMOpeningHoursEditorAllDayCell]; - NSIndexPath * reloadPath = [NSIndexPath indexPathForRow:reloadRow inSection:self.index]; - MWMOpeningHoursTableViewCell * reloadCell = [tableView cellForRowAtIndexPath:reloadPath]; - [reloadCell hide]; - [tableView reloadRowsAtIndexPaths:@[ reloadPath ] - withRowAnimation:kMWMOpeningHoursEditorRowAnimation]; - if (addRows) [tableView insertRowsAtIndexPaths:indexes withRowAnimation:kMWMOpeningHoursEditorRowAnimation]; else |