forked from organicmaps/organicmaps
[layout] [ios] Fixed search filters screen layout.
This commit is contained in:
parent
ba3d273582
commit
0dba9c6c0d
3 changed files with 30 additions and 33 deletions
|
@ -9,13 +9,17 @@ final class FilterCheckCell: MWMTableViewCell {
|
|||
@IBOutlet private var checkLabels: [UILabel]!
|
||||
@IBOutlet weak var checkInLabel: UILabel! {
|
||||
didSet {
|
||||
checkInLabel.text = L("booking_filters_check_in")
|
||||
checkInLabel.text = L("booking_filters_check_in").uppercased()
|
||||
checkInLabel.font = .regular14()
|
||||
checkInLabel.textColor = .blackSecondaryText()
|
||||
}
|
||||
}
|
||||
|
||||
@IBOutlet weak var checkOutLabel: UILabel! {
|
||||
didSet {
|
||||
checkOutLabel.text = L("booking_filters_check_out")
|
||||
checkOutLabel.text = L("booking_filters_check_out").uppercased()
|
||||
checkOutLabel.font = .regular14()
|
||||
checkOutLabel.textColor = .blackSecondaryText()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,15 +67,6 @@ final class FilterCheckCell: MWMTableViewCell {
|
|||
checkButtons.forEach { setupButton($0) }
|
||||
}
|
||||
|
||||
fileprivate func setupLabel(_ label: UILabel) {
|
||||
label.font = UIFont.bold12()
|
||||
label.textColor = UIColor.blackSecondaryText()
|
||||
}
|
||||
|
||||
@objc func refreshLabelsAppearance() {
|
||||
checkLabels.forEach { setupLabel($0) }
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
isSeparatorHidden = true
|
||||
|
|
|
@ -101,8 +101,9 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
|
|||
}
|
||||
} // namespace
|
||||
|
||||
@interface MWMSearchHotelsFilterViewController ()<
|
||||
UICollectionViewDelegate, UICollectionViewDataSource, MWMFilterCheckCellDelegate>
|
||||
@interface MWMSearchHotelsFilterViewController ()<UICollectionViewDelegate,
|
||||
UICollectionViewDataSource,
|
||||
MWMFilterCheckCellDelegate, UITableViewDataSource>
|
||||
{
|
||||
std::vector<ftypes::IsHotelChecker::Type> m_selectedTypes;
|
||||
}
|
||||
|
@ -155,6 +156,7 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
|
|||
{
|
||||
self.view.backgroundColor = [UIColor pressBackground];
|
||||
self.tableView.backgroundColor = [UIColor clearColor];
|
||||
self.tableView.contentInset = {-20, 0, 80, 0};
|
||||
}
|
||||
|
||||
- (void)refreshDoneButtonAppearance
|
||||
|
@ -183,7 +185,6 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
|
|||
- (void)initialCheckConfig
|
||||
{
|
||||
MWMFilterCheckCell * check = self.check;
|
||||
[check refreshLabelsAppearance];
|
||||
[check refreshButtonsAppearance];
|
||||
check.isOffline = !Platform::IsConnected();
|
||||
check.delegate = self;
|
||||
|
|
|
@ -18,23 +18,8 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZN9-tQ-vmX">
|
||||
<rect key="frame" x="16" y="623" width="343" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="5sg-ZZ-930"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="applyAction" destination="LNn-Gp-Jtg" eventType="touchUpInside" id="q2Q-O2-QLa"/>
|
||||
</connections>
|
||||
</button>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="7db-bh-egf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="1" estimatedSectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="7db-bh-egf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MWMFilterCheckCell" rowHeight="71" id="kQ5-BZ-yUa" customClass="MWMFilterCheckCell">
|
||||
|
@ -352,6 +337,21 @@
|
|||
<outlet property="dataSource" destination="LNn-Gp-Jtg" id="rq0-5v-lvv"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZN9-tQ-vmX">
|
||||
<rect key="frame" x="16" y="607" width="343" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="5sg-ZZ-930"/>
|
||||
</constraints>
|
||||
<state key="normal" title="Button"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="applyAction" destination="LNn-Gp-Jtg" eventType="touchUpInside" id="q2Q-O2-QLa"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
|
@ -359,9 +359,10 @@
|
|||
<constraint firstAttribute="trailing" secondItem="7db-bh-egf" secondAttribute="trailing" id="5VV-72-Y7v"/>
|
||||
<constraint firstItem="ZN9-tQ-vmX" firstAttribute="leading" secondItem="WEm-4S-gb9" secondAttribute="leading" constant="16" id="VQ6-h4-L6t"/>
|
||||
<constraint firstItem="7db-bh-egf" firstAttribute="top" secondItem="a4S-IT-Fgz" secondAttribute="top" id="f0d-a8-5Mp"/>
|
||||
<constraint firstItem="WEm-4S-gb9" firstAttribute="bottom" secondItem="ZN9-tQ-vmX" secondAttribute="bottom" id="z2w-0r-wN3"/>
|
||||
<constraint firstItem="ZN9-tQ-vmX" firstAttribute="top" secondItem="7db-bh-egf" secondAttribute="bottom" id="zDx-DX-vJL"/>
|
||||
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="ZN9-tQ-vmX" secondAttribute="bottom" constant="16" id="qNP-0R-u0W"/>
|
||||
<constraint firstItem="WEm-4S-gb9" firstAttribute="bottom" secondItem="ZN9-tQ-vmX" secondAttribute="bottom" priority="100" id="z2w-0r-wN3"/>
|
||||
<constraint firstItem="WEm-4S-gb9" firstAttribute="trailing" secondItem="ZN9-tQ-vmX" secondAttribute="trailing" constant="16" id="zVX-kB-p39"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7db-bh-egf" secondAttribute="bottom" id="zwQ-GR-Y9L"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="WEm-4S-gb9"/>
|
||||
</view>
|
||||
|
|
Loading…
Add table
Reference in a new issue