[iOS] add rooms/guests picker to hotel search

https://jira.mail.ru/browse/MAPSME-14179
This commit is contained in:
Aleksey Belousov 2020-07-22 09:34:49 +03:00 committed by Alexander Boriskov
parent c293f9a28f
commit 6c0595c2ac
20 changed files with 1418 additions and 7 deletions

View file

@ -21,7 +21,7 @@ static NSString * const kSelectedPattern = @"%@_selected_%@";
- (void)setColoring:(MWMButtonColoring)coloring
{
_coloring = coloring;
[self setDefaultTintColor];
[self setEnabled:self.enabled];
}
- (void)changeColoringToOpposite
@ -80,7 +80,7 @@ static NSString * const kSelectedPattern = @"%@_selected_%@";
if (self.selected)
[self setSelected:YES];
else
[self setDefaultTintColor];
[self setEnabled:self.enabled];
}
}
@ -104,7 +104,7 @@ static NSString * const kSelectedPattern = @"%@_selected_%@";
}
else
{
[self setDefaultTintColor];
[self setEnabled:self.enabled];
}
}

View file

@ -0,0 +1,19 @@
extension ValueStepperView {
override func applyTheme() {
if styleName.isEmpty {
styleName = "ValueStepperView"
}
for style in StyleManager.shared.getStyle(styleName) where !style.isEmpty && !style.hasExclusion(view: self) {
ValueStepperViewRenderer.render(self, style: style)
}
}
}
fileprivate final class ValueStepperViewRenderer {
class func render(_ control: ValueStepperView, style: Style) {
control.plusButton.coloring = style.coloring!
control.minusButton.coloring = style.coloring!
control.valueLabel.font = style.font
control.valueLabel.textColor = style.fontColor
}
}

View file

@ -128,5 +128,11 @@ class SearchStyleSheet: IStyleSheet {
theme.add(styleName: "BookingDatePickerDone", from: "FlatNormalTransButton") { (s) -> (Void) in
s.font = fonts.semibold16
}
theme.add(styleName: "ValueStepperView") { (s) -> (Void) in
s.font = fonts.regular16
s.fontColor = colors.blackPrimaryText
s.coloring = MWMButtonColoring.blue
}
}
}

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Fill 1.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,127 @@
%PDF-1.7
1 0 obj
<< /ExtGState << /E1 << /ca 0.540000 >> >> >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 0.000000 0.000000 scn
13.000000 20.000000 m
12.484000 20.000000 11.688000 19.871000 10.781000 19.312000 c
10.375000 19.062000 9.973001 18.695000 9.656000 18.219000 c
9.453000 18.371000 9.242001 18.496000 9.031000 18.594000 c
8.238000 18.965000 7.484000 19.000000 7.000000 19.000000 c
7.000000 17.000000 l
7.301000 17.000000 7.754000 16.969000 8.125000 16.812000 c
4.754000 16.094000 2.129000 13.461000 1.656000 10.062000 c
0.730000 9.695001 0.000000 8.965000 0.000000 7.906000 c
0.000000 6.926001 0.684000 6.176001 1.562000 5.781000 c
1.691000 5.309000 1.992000 4.277000 2.969000 3.062000 c
4.207000 1.523001 6.473000 0.000000 10.000000 0.000000 c
13.527000 0.000000 15.793000 1.523001 17.031000 3.062000 c
18.007999 4.277000 18.309000 5.309000 18.438000 5.781000 c
19.316000 6.176001 20.000000 6.926001 20.000000 7.906000 c
20.000000 8.965000 19.270000 9.695001 18.344000 10.062000 c
17.840000 13.691000 14.882999 16.417999 11.188000 16.906000 c
11.340000 17.233999 11.566000 17.452999 11.844000 17.625000 c
12.312000 17.914000 13.016000 18.000000 13.000000 18.000000 c
13.000000 20.000000 l
h
10.000000 15.000000 m
13.535000 15.000000 16.327999 12.594000 16.500000 9.344000 c
16.562000 8.406000 l
17.500000 8.406000 l
17.715000 8.406000 18.000000 8.121000 18.000000 7.906000 c
18.000000 7.605000 17.809000 7.406000 17.594000 7.406000 c
16.781000 7.406000 l
16.625000 6.594000 l
16.625000 6.594000 16.402000 5.473001 15.469000 4.312000 c
14.535000 3.152000 12.973000 2.000000 10.000000 2.000000 c
7.027000 2.000000 5.465000 3.152000 4.531000 4.312000 c
3.598000 5.473001 3.375000 6.594000 3.375000 6.594000 c
3.219000 7.406000 l
2.406000 7.406000 l
2.191000 7.406000 2.000000 7.605000 2.000000 7.906000 c
2.000000 8.121000 2.285000 8.406000 2.500000 8.406000 c
3.438000 8.406000 l
3.500000 9.344000 l
3.672000 12.594000 6.465000 15.000000 10.000000 15.000000 c
h
7.500000 11.000000 m
6.672000 11.000000 6.000000 10.328000 6.000000 9.500000 c
6.000000 8.672000 6.672000 8.000000 7.500000 8.000000 c
8.328000 8.000000 9.000000 8.672000 9.000000 9.500000 c
9.000000 10.328000 8.328000 11.000000 7.500000 11.000000 c
h
12.500000 11.000000 m
11.672000 11.000000 11.000000 10.328000 11.000000 9.500000 c
11.000000 8.672000 11.672000 8.000000 12.500000 8.000000 c
13.328000 8.000000 14.000000 8.672000 14.000000 9.500000 c
14.000000 10.328000 13.328000 11.000000 12.500000 11.000000 c
h
7.156000 6.281000 m
5.656000 4.938000 l
6.742000 3.730000 8.312000 3.000000 10.000000 3.000000 c
11.688000 3.000000 13.257999 3.730000 14.344000 4.938000 c
12.844000 6.281000 l
12.133000 5.488000 11.113000 5.000000 10.000000 5.000000 c
8.887000 5.000000 7.867000 5.488000 7.156000 6.281000 c
h
f*
n
Q
endstream
endobj
3 0 obj
2786
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 20.000000 20.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000074 00000 n
0000002916 00000 n
0000002939 00000 n
0000003112 00000 n
0000003186 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
3245
%%EOF

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Vector.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,98 @@
%PDF-1.7
1 0 obj
<< /ExtGState << /E1 << /ca 0.540000 >> >> >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 -0.867523 cm
0.000000 0.000000 0.000000 scn
6.318264 3.882929 m
5.398484 2.963148 3.935197 2.963148 3.015417 3.882929 c
2.095636 4.802710 2.095636 6.265996 3.015417 7.185777 c
3.935197 8.105556 5.398484 8.105556 6.318264 7.185777 c
7.217141 6.265996 7.217141 4.781805 6.318264 3.882929 c
h
14.909851 7.185777 m
6.318264 15.777362 l
5.774758 16.320869 4.875881 16.320869 4.332375 15.777362 c
3.788868 15.233855 3.788868 14.334979 4.332375 13.791472 c
7.969689 10.154158 l
7.238045 9.422515 l
5.419389 10.634953 2.952704 10.425911 1.363993 8.837199 c
-0.454664 7.018542 -0.454664 4.050159 1.363993 2.231503 c
3.182649 0.412848 6.151032 0.412848 7.969689 2.231503 c
9.579305 3.841120 9.767441 6.307803 8.555003 8.105556 c
9.286647 8.837199 l
12.923961 5.199886 l
13.467467 4.656380 14.366344 4.656380 14.909851 5.199886 c
15.453358 5.743393 15.453358 6.642270 14.909851 7.185777 c
h
18.777109 20.104511 m
17.125687 21.755934 14.470864 21.755934 12.819440 20.104511 c
10.666318 17.951387 12.464070 16.780758 10.770838 15.087526 c
10.729030 15.024815 9.809249 14.125938 9.809249 14.125938 c
9.642016 13.958705 9.621113 13.624239 9.746537 13.394293 c
12.045988 11.094842 l
12.255030 10.948514 12.589495 10.969419 12.777632 11.157555 c
12.777632 11.157555 13.697413 12.077335 13.760126 12.140047 c
15.453359 13.833280 16.623987 12.035527 18.777109 14.188650 c
20.407629 15.798265 20.407629 18.473991 18.777109 20.104511 c
h
f
n
Q
endstream
endobj
3 0 obj
1506
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 20.000000 20.475555 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000074 00000 n
0000001636 00000 n
0000001659 00000 n
0000001832 00000 n
0000001906 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1965
%%EOF

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Second Action.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,163 @@
%PDF-1.7
1 0 obj
<< /BBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources << >>
/Subtype /Form
/Length 2 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.142500 0.613542 0.950000 scn
0.000000 22.000000 m
22.000000 22.000000 l
22.000000 0.000000 l
0.000000 0.000000 l
0.000000 22.000000 l
h
f*
n
Q
endstream
endobj
2 0 obj
233
endobj
3 0 obj
<< /BBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources << >>
/Subtype /Form
/Length 4 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.916992 0.916687 cm
0.000000 0.000000 0.000000 scn
0.000000 10.083323 m
0.000000 15.643365 4.523292 20.166656 10.083333 20.166656 c
15.643374 20.166656 20.166666 15.643365 20.166666 10.083323 c
20.166666 4.523282 15.643374 -0.000010 10.083333 -0.000010 c
4.523292 -0.000010 0.000000 4.523282 0.000000 10.083323 c
h
4.583333 9.624990 m
4.583333 8.865599 5.198942 8.249990 5.958333 8.249990 c
14.208334 8.249990 l
14.967725 8.249990 15.583334 8.865599 15.583334 9.624990 c
15.583334 10.384381 14.967725 10.999990 14.208334 10.999990 c
5.958333 10.999990 l
5.198942 10.999990 4.583333 10.384381 4.583333 9.624990 c
h
f*
n
Q
endstream
endobj
4 0 obj
689
endobj
5 0 obj
<< /XObject << /X1 1 0 R >>
/ExtGState << /E2 << /SMask << /Type /Mask
/G 3 0 R
/S /Alpha
>>
/Type /ExtGState
>>
/E1 << /ca 0.000025 >>
>>
>>
endobj
6 0 obj
<< /Length 7 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
1.000000 0.152955 0.152955 scn
0.000000 22.000000 m
22.000000 22.000000 l
22.000000 0.000000 l
0.000000 0.000000 l
0.000000 22.000000 l
h
f
n
Q
q
/E2 gs
/X1 Do
Q
endstream
endobj
7 0 obj
257
endobj
8 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources 5 0 R
/Contents 6 0 R
/Parent 9 0 R
>>
endobj
9 0 obj
<< /Kids [ 8 0 R ]
/Count 1
/Type /Pages
>>
endobj
10 0 obj
<< /Type /Catalog
/Pages 9 0 R
>>
endobj
xref
0 11
0000000000 65535 f
0000000010 00000 n
0000000491 00000 n
0000000513 00000 n
0000001450 00000 n
0000001472 00000 n
0000001828 00000 n
0000002141 00000 n
0000002163 00000 n
0000002336 00000 n
0000002410 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 10 0 R
/Size 11
>>
startxref
2470
%%EOF

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "icons8-user_group_man_man.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,94 @@
%PDF-1.7
1 0 obj
<< /ExtGState << /E1 << /ca 0.540000 >> >> >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 0.000000 0.000000 scn
6.500000 15.000000 m
4.602000 15.000000 3.000000 13.398000 3.000000 11.500000 c
3.000000 9.602000 4.602000 8.000000 6.500000 8.000000 c
8.398000 8.000000 10.000000 9.602000 10.000000 11.500000 c
10.000000 13.398000 8.398000 15.000000 6.500000 15.000000 c
h
15.500000 15.000000 m
13.566000 15.000000 12.000000 13.434000 12.000000 11.500000 c
12.000000 9.566000 13.566000 8.000000 15.500000 8.000000 c
17.434000 8.000000 19.000000 9.566000 19.000000 11.500000 c
19.000000 13.434000 17.434000 15.000000 15.500000 15.000000 c
h
6.500000 6.000000 m
1.602000 6.000000 0.000000 2.000000 0.000000 2.000000 c
0.000000 0.000000 l
13.000000 0.000000 l
13.000000 2.000000 l
13.000000 2.000000 11.398000 6.000000 6.500000 6.000000 c
h
15.500000 6.000000 m
14.000000 6.000000 12.805000 5.594000 11.906000 5.094000 c
13.305000 3.895000 13.898001 2.507999 14.000000 2.406000 c
14.094000 2.188000 l
14.094000 0.000000 l
22.094000 0.000000 l
22.094000 2.000000 l
21.992001 2.000000 20.398001 6.000000 15.500000 6.000000 c
h
f*
n
Q
endstream
endobj
3 0 obj
1139
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 22.093750 15.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000074 00000 n
0000001269 00000 n
0000001292 00000 n
0000001465 00000 n
0000001539 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1598
%%EOF

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Second Action.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,173 @@
%PDF-1.7
1 0 obj
<< /BBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources << >>
/Subtype /Form
/Length 2 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.117647 0.588235 0.941176 scn
0.000000 22.000000 m
22.000000 22.000000 l
22.000000 0.000000 l
0.000000 0.000000 l
0.000000 22.000000 l
h
f*
n
Q
endstream
endobj
2 0 obj
233
endobj
3 0 obj
<< /BBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources << >>
/Subtype /Form
/Length 4 0 R
/Group << /Type /Group
/S /Transparency
>>
/Type /XObject
>>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 0.916992 0.916656 cm
0.000000 0.000000 0.000000 scn
10.083333 20.166656 m
4.523292 20.166656 0.000000 15.643365 0.000000 10.083323 c
0.000000 4.523282 4.523292 -0.000010 10.083333 -0.000010 c
15.643374 -0.000010 20.166666 4.523282 20.166666 10.083323 c
20.166666 15.643365 15.643374 20.166656 10.083333 20.166656 c
h
8.708333 14.208323 m
8.708333 14.967714 9.323941 15.583323 10.083333 15.583323 c
10.842725 15.583323 11.458333 14.967714 11.458333 14.208323 c
11.458333 11.458323 l
14.208333 11.458323 l
14.967725 11.458323 15.583334 10.842715 15.583334 10.083323 c
15.583334 9.323932 14.967725 8.708323 14.208334 8.708323 c
11.458333 8.708323 l
11.458333 5.958323 l
11.458333 5.198932 10.842725 4.583323 10.083333 4.583323 c
9.323941 4.583323 8.708333 5.198932 8.708333 5.958323 c
8.708333 8.708323 l
5.958333 8.708323 l
5.198942 8.708323 4.583333 9.323932 4.583333 10.083323 c
4.583333 10.842715 5.198942 11.458323 5.958333 11.458323 c
8.708333 11.458323 l
8.708333 14.208323 l
h
f*
n
Q
endstream
endobj
4 0 obj
1056
endobj
5 0 obj
<< /XObject << /X1 1 0 R >>
/ExtGState << /E2 << /SMask << /Type /Mask
/G 3 0 R
/S /Alpha
>>
/Type /ExtGState
>>
/E1 << /ca 0.000025 >>
>>
>>
endobj
6 0 obj
<< /Length 7 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
1.000000 0.152955 0.152955 scn
0.000000 22.000000 m
22.000000 22.000000 l
22.000000 0.000000 l
0.000000 0.000000 l
0.000000 22.000000 l
h
f
n
Q
q
/E2 gs
/X1 Do
Q
endstream
endobj
7 0 obj
257
endobj
8 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 22.000000 22.000000 ]
/Resources 5 0 R
/Contents 6 0 R
/Parent 9 0 R
>>
endobj
9 0 obj
<< /Kids [ 8 0 R ]
/Count 1
/Type /Pages
>>
endobj
10 0 obj
<< /Type /Catalog
/Pages 9 0 R
>>
endobj
xref
0 11
0000000000 65535 f
0000000010 00000 n
0000000491 00000 n
0000000513 00000 n
0000001817 00000 n
0000001840 00000 n
0000002196 00000 n
0000002509 00000 n
0000002531 00000 n
0000002704 00000 n
0000002778 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 10 0 R
/Size 11
>>
startxref
2838
%%EOF

View file

@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Fill 1.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -0,0 +1,96 @@
%PDF-1.7
1 0 obj
<< /ExtGState << /E1 << /ca 0.540000 >> >> >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
/E1 gs
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
0.000000 0.000000 0.000000 scn
1.000000 13.000000 m
0.449000 13.000000 0.000000 12.551000 0.000000 12.000000 c
0.000000 0.000000 l
2.000000 0.000000 l
2.000000 1.000000 l
2.000000 1.551000 2.449000 2.000000 3.000000 2.000000 c
17.000000 2.000000 l
17.551001 2.000000 18.000000 1.551000 18.000000 1.000000 c
18.000000 0.000000 l
20.000000 0.000000 l
20.000000 5.000000 l
2.000000 5.000000 l
2.000000 12.000000 l
2.000000 12.551000 1.551000 13.000000 1.000000 13.000000 c
h
4.000000 10.000000 m
3.449000 10.000000 3.000000 9.551001 3.000000 9.000000 c
3.000000 6.000000 l
7.000000 6.000000 l
7.000000 9.000000 l
7.000000 9.551001 6.551000 10.000000 6.000000 10.000000 c
4.000000 10.000000 l
h
8.000000 10.000000 m
8.000000 6.000000 l
20.000000 6.000000 l
20.000000 8.000000 l
20.000000 9.105000 19.105000 10.000000 18.000000 10.000000 c
8.000000 10.000000 l
h
f*
n
Q
endstream
endobj
3 0 obj
960
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 20.000000 13.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Type /Catalog
/Pages 5 0 R
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000074 00000 n
0000001090 00000 n
0000001112 00000 n
0000001285 00000 n
0000001359 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
1418
%%EOF

View file

@ -357,6 +357,10 @@
475EC36D244EDE66003BC295 /* GuidesGalleryPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475EC36C244EDE66003BC295 /* GuidesGalleryPresenter.swift */; };
475EC36F244EF7A9003BC295 /* GuidesGalleryBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475EC36E244EF7A9003BC295 /* GuidesGalleryBuilder.swift */; };
475EC373244F0992003BC295 /* PlacePageGalleryLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475EC372244F0992003BC295 /* PlacePageGalleryLayout.swift */; };
475ED78324C7A5400063ADC7 /* GuestsPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475ED78124C7A5400063ADC7 /* GuestsPickerViewController.swift */; };
475ED78424C7A5400063ADC7 /* GuestsPickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 475ED78224C7A5400063ADC7 /* GuestsPickerViewController.xib */; };
475ED78624C7C7300063ADC7 /* ValueStepperViewRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475ED78524C7C72F0063ADC7 /* ValueStepperViewRenderer.swift */; };
475ED78824C7D0F30063ADC7 /* ValueStepperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 475ED78724C7D0F30063ADC7 /* ValueStepperView.swift */; };
4767CD9F20AAD48A00BD8166 /* Checkmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CD9E20AAD48A00BD8166 /* Checkmark.swift */; };
4767CDA420AAF66B00BD8166 /* NSAttributedString+HTML.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CDA320AAF66B00BD8166 /* NSAttributedString+HTML.swift */; };
4767CDA620AB1F6200BD8166 /* LeftAlignedIconButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CDA520AB1F6200BD8166 /* LeftAlignedIconButton.swift */; };
@ -1486,6 +1490,10 @@
475EC36C244EDE66003BC295 /* GuidesGalleryPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuidesGalleryPresenter.swift; sourceTree = "<group>"; };
475EC36E244EF7A9003BC295 /* GuidesGalleryBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuidesGalleryBuilder.swift; sourceTree = "<group>"; };
475EC372244F0992003BC295 /* PlacePageGalleryLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlacePageGalleryLayout.swift; sourceTree = "<group>"; };
475ED78124C7A5400063ADC7 /* GuestsPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GuestsPickerViewController.swift; sourceTree = "<group>"; };
475ED78224C7A5400063ADC7 /* GuestsPickerViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GuestsPickerViewController.xib; sourceTree = "<group>"; };
475ED78524C7C72F0063ADC7 /* ValueStepperViewRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValueStepperViewRenderer.swift; sourceTree = "<group>"; };
475ED78724C7D0F30063ADC7 /* ValueStepperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValueStepperView.swift; sourceTree = "<group>"; };
4767CD9E20AAD48A00BD8166 /* Checkmark.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checkmark.swift; sourceTree = "<group>"; };
4767CDA320AAF66B00BD8166 /* NSAttributedString+HTML.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+HTML.swift"; sourceTree = "<group>"; };
4767CDA520AB1F6200BD8166 /* LeftAlignedIconButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftAlignedIconButton.swift; sourceTree = "<group>"; };
@ -2316,7 +2324,7 @@
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA = {
29B97314FDCFA39411CA2CEA /* Maps */ = {
isa = PBXGroup;
children = (
47AEF83F2231249E00D20538 /* categories_brands.txt */,
@ -3744,6 +3752,7 @@
47D48BF42432A7C900FEFB1F /* ChartViewRenderer.swift */,
9977E6A22480F9BF0073780C /* BottomMenuLayerButtonRenderer.swift */,
47A13CAC24BE9AA500027D4F /* DatePickerViewRenderer.swift */,
475ED78524C7C72F0063ADC7 /* ValueStepperViewRenderer.swift */,
);
path = Renderers;
sourceTree = "<group>";
@ -4743,6 +4752,9 @@
47A13CA824BE881000027D4F /* DatePickerViewController.swift */,
990F33B524BC915200D0F426 /* SearchActionBarView.swift */,
47A13CA924BE881000027D4F /* DatePickerViewController.xib */,
475ED78124C7A5400063ADC7 /* GuestsPickerViewController.swift */,
475ED78224C7A5400063ADC7 /* GuestsPickerViewController.xib */,
475ED78724C7D0F30063ADC7 /* ValueStepperView.swift */,
);
path = Search;
sourceTree = "<group>";
@ -5067,7 +5079,7 @@
"en-GB",
el,
);
mainGroup = 29B97314FDCFA39411CA2CEA;
mainGroup = 29B97314FDCFA39411CA2CEA /* Maps */;
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = "";
projectRoot = "";
@ -5113,6 +5125,7 @@
6741A9451BF340DE002C974C /* classificator.txt in Resources */,
676507611C10559B00830BB3 /* colors.txt in Resources */,
6741A9711BF340DE002C974C /* copyright.html in Resources */,
475ED78424C7A5400063ADC7 /* GuestsPickerViewController.xib in Resources */,
4A300ED51C6DCFD400140018 /* countries-strings in Resources */,
6741A9491BF340DE002C974C /* countries.txt in Resources */,
347752931F7251C7000D46A3 /* UGCAddReviewTextCell.xib in Resources */,
@ -5649,6 +5662,7 @@
6741A9E01BF340DE002C974C /* MWMDownloaderDialogHeader.mm in Sources */,
479D306822C66C8F00D18278 /* MWMBookmarksBannerViewController.m in Sources */,
CDCA2748223FD24600167D87 /* MWMCarPlaySearchResultObject.mm in Sources */,
475ED78824C7D0F30063ADC7 /* ValueStepperView.swift in Sources */,
3454D7E01E07F045004AF2AD /* UITextField+RuntimeAttributes.m in Sources */,
99AAEA78244DA9810039D110 /* BottomMenuTransitioningManager.swift in Sources */,
1DFA2F6A20D3B57400FB2C66 /* UIColor+PartnerColor.m in Sources */,
@ -5740,6 +5754,7 @@
3304306D21D4EAFB00317CA3 /* SearchCategoryCell.swift in Sources */,
34AB66111FC5AA320078E451 /* NavigationTurnsView.swift in Sources */,
348A8DF81F66775A00D83026 /* RatingViewDelegate.swift in Sources */,
475ED78624C7C7300063ADC7 /* ValueStepperViewRenderer.swift in Sources */,
4716EABA21A325310029B886 /* IPaidRouteStatistics.swift in Sources */,
475EC36D244EDE66003BC295 /* GuidesGalleryPresenter.swift in Sources */,
47A13CAA24BE881000027D4F /* DatePickerViewController.swift in Sources */,
@ -5897,6 +5912,7 @@
471A7BC02481C82500A0D4C1 /* BookmarkTitleCell.swift in Sources */,
34AB661A1FC5AA330078E451 /* MWMTaxiCollectionLayout.m in Sources */,
33F8BA4E2199AB9500ECA8EE /* TagsDataSource.swift in Sources */,
475ED78324C7A5400063ADC7 /* GuestsPickerViewController.swift in Sources */,
993F5507237C622700545511 /* DeepLinkSearchStrategy.swift in Sources */,
47F67D1521CAB21B0069754E /* MWMImageCoder.m in Sources */,
34AB66861FC5AA330078E451 /* MWMNavigationInfoView.mm in Sources */,

View file

@ -0,0 +1,52 @@
@objc protocol GuestsPickerViewControllerDelegate: AnyObject {
func guestsPicker(_ guestsPicker: GuestsPickerViewController,
didSelectRooms rooms: Int,
adults: Int,
children: Int,
infants: Int)
func guestsPickerDidCancel(_ guestsPicker: GuestsPickerViewController)
}
@objc final class GuestsPickerViewController: UIViewController {
private let transitioning = CoverVerticalModalTransitioning(presentationHeight: 320)
@IBOutlet var roomsStepper: ValueStepperView!
@IBOutlet var adultsStepper: ValueStepperView!
@IBOutlet var childrenStepper: ValueStepperView!
@IBOutlet var infantsStepper: ValueStepperView!
@objc weak var delegate: GuestsPickerViewControllerDelegate?
override func viewDidLoad() {
super.viewDidLoad()
roomsStepper.minValue = 1
roomsStepper.maxValue = 10
adultsStepper.minValue = 1
adultsStepper.maxValue = 20
adultsStepper.value = 2
childrenStepper.maxValue = 20
infantsStepper.maxValue = 20
}
override var transitioningDelegate: UIViewControllerTransitioningDelegate? {
get { return transitioning }
set { }
}
override var modalPresentationStyle: UIModalPresentationStyle {
get { return .custom }
set { }
}
@IBAction func onDone(_ sender: UIButton) {
delegate?.guestsPicker(self,
didSelectRooms: roomsStepper.value,
adults: adultsStepper.value,
children: childrenStepper.value,
infants: infantsStepper.value)
}
@IBAction func onCancel(_ sender: UIButton) {
delegate?.guestsPickerDidCancel(self)
}
}

View file

@ -0,0 +1,374 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GuestsPickerViewController" customModule="maps_me" customModuleProvider="target">
<connections>
<outlet property="adultsStepper" destination="Iih-wx-HWd" id="hwy-iS-k7t"/>
<outlet property="childrenStepper" destination="9lH-D3-kHh" id="tTO-Du-gAf"/>
<outlet property="infantsStepper" destination="bxZ-h9-CGP" id="faU-U3-0gU"/>
<outlet property="roomsStepper" destination="UuG-Jq-Ceh" id="4d0-qt-bKi"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="414" height="320"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="3ZC-cU-MNM">
<rect key="frame" x="0.0" y="0.0" width="414" height="320"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xyR-57-dCD">
<rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Family" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TG5-PM-toX">
<rect key="frame" x="16" y="10" width="382" height="29"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="bold20:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="Family"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="apc-aI-IJI">
<rect key="frame" x="16" y="49" width="398" height="1"/>
<color key="backgroundColor" systemColor="separatorColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="BRZ-qD-EIb"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="apc-aI-IJI" secondAttribute="trailing" id="6hS-JO-3ti"/>
<constraint firstAttribute="trailing" secondItem="TG5-PM-toX" secondAttribute="trailing" constant="16" id="OX7-EM-Uno"/>
<constraint firstItem="TG5-PM-toX" firstAttribute="leading" secondItem="xyR-57-dCD" secondAttribute="leading" constant="16" id="S3L-Uc-9La"/>
<constraint firstItem="apc-aI-IJI" firstAttribute="leading" secondItem="xyR-57-dCD" secondAttribute="leading" constant="16" id="YBL-40-Y0b"/>
<constraint firstAttribute="bottom" secondItem="apc-aI-IJI" secondAttribute="bottom" id="c7o-Qq-Gr7"/>
<constraint firstItem="TG5-PM-toX" firstAttribute="top" secondItem="xyR-57-dCD" secondAttribute="top" constant="10" id="vhz-a8-9hP"/>
<constraint firstItem="apc-aI-IJI" firstAttribute="top" secondItem="TG5-PM-toX" secondAttribute="bottom" constant="10" id="zdt-qK-Ubw"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8cM-v0-O7k">
<rect key="frame" x="0.0" y="50" width="414" height="49"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9md-9e-Ze0">
<rect key="frame" x="56" y="48" width="358" height="1"/>
<color key="backgroundColor" systemColor="separatorColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="ySS-I1-GZF"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_booking_room" translatesAutoresizingMaskIntoConstraints="NO" id="vYB-zA-nJQ">
<rect key="frame" x="16" y="12.5" width="24" height="24"/>
<color key="tintColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="6aD-2h-Vgl"/>
<constraint firstAttribute="width" constant="24" id="o7Z-29-OIH"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rooms" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gnR-wq-ESo">
<rect key="frame" x="56" y="14" width="234" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_rooms"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UuG-Jq-Ceh" customClass="ValueStepperView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="306" y="5.5" width="100" height="38"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="AKR-Yw-d97"/>
<constraint firstAttribute="width" constant="100" id="KqJ-Cs-Aug"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="gnR-wq-ESo" firstAttribute="top" secondItem="8cM-v0-O7k" secondAttribute="top" constant="14" id="0fc-IZ-YIl"/>
<constraint firstItem="9md-9e-Ze0" firstAttribute="leading" secondItem="8cM-v0-O7k" secondAttribute="leading" constant="56" id="0zT-nJ-4ly"/>
<constraint firstItem="vYB-zA-nJQ" firstAttribute="leading" secondItem="8cM-v0-O7k" secondAttribute="leading" constant="16" id="3pi-YI-1ai"/>
<constraint firstItem="UuG-Jq-Ceh" firstAttribute="leading" secondItem="gnR-wq-ESo" secondAttribute="trailing" constant="16" id="81u-my-mbt"/>
<constraint firstItem="vYB-zA-nJQ" firstAttribute="centerY" secondItem="8cM-v0-O7k" secondAttribute="centerY" id="Ejr-SE-2So"/>
<constraint firstAttribute="trailing" secondItem="9md-9e-Ze0" secondAttribute="trailing" id="SE3-Bm-5lR"/>
<constraint firstItem="UuG-Jq-Ceh" firstAttribute="centerY" secondItem="8cM-v0-O7k" secondAttribute="centerY" id="cKz-zn-z2o"/>
<constraint firstAttribute="bottom" secondItem="gnR-wq-ESo" secondAttribute="bottom" constant="14" id="e8U-f5-1HP"/>
<constraint firstAttribute="trailing" secondItem="UuG-Jq-Ceh" secondAttribute="trailing" constant="8" id="mBb-w4-VSw"/>
<constraint firstAttribute="bottom" secondItem="9md-9e-Ze0" secondAttribute="bottom" id="oh3-V5-EYZ"/>
<constraint firstItem="gnR-wq-ESo" firstAttribute="leading" secondItem="vYB-zA-nJQ" secondAttribute="trailing" constant="16" id="vW6-Y3-Wa4"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LZa-Gy-akP">
<rect key="frame" x="0.0" y="99" width="414" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CqJ-mp-Yqh">
<rect key="frame" x="56" y="49" width="358" height="1"/>
<color key="backgroundColor" systemColor="separatorColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Fye-yR-j29"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_booking_people" translatesAutoresizingMaskIntoConstraints="NO" id="xgI-wP-Ash">
<rect key="frame" x="16" y="13" width="24" height="24"/>
<color key="tintColor" white="0.13233090750000001" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="Uq7-1Q-nj7"/>
<constraint firstAttribute="width" constant="24" id="cQA-nc-8Mi"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Adults" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NwB-tL-w2R">
<rect key="frame" x="56" y="14" width="234" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_adults"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iih-wx-HWd" customClass="ValueStepperView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="306" y="6" width="100" height="38"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="H6l-kr-84N"/>
<constraint firstAttribute="height" constant="38" id="sap-u6-Aam"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="NwB-tL-w2R" firstAttribute="leading" secondItem="xgI-wP-Ash" secondAttribute="trailing" constant="16" id="0Av-Mo-fnf"/>
<constraint firstAttribute="trailing" secondItem="Iih-wx-HWd" secondAttribute="trailing" constant="8" id="Izy-FU-4zt"/>
<constraint firstAttribute="bottom" secondItem="CqJ-mp-Yqh" secondAttribute="bottom" id="O5m-hG-MhD"/>
<constraint firstItem="xgI-wP-Ash" firstAttribute="centerY" secondItem="LZa-Gy-akP" secondAttribute="centerY" id="R7q-3M-LbP"/>
<constraint firstAttribute="bottom" secondItem="NwB-tL-w2R" secondAttribute="bottom" constant="14" id="STT-9V-J4p"/>
<constraint firstAttribute="trailing" secondItem="CqJ-mp-Yqh" secondAttribute="trailing" id="huu-2l-2Nf"/>
<constraint firstItem="Iih-wx-HWd" firstAttribute="centerY" secondItem="LZa-Gy-akP" secondAttribute="centerY" id="ilg-Cg-1wv"/>
<constraint firstItem="CqJ-mp-Yqh" firstAttribute="leading" secondItem="LZa-Gy-akP" secondAttribute="leading" constant="56" id="l3P-Ss-rBb"/>
<constraint firstItem="xgI-wP-Ash" firstAttribute="leading" secondItem="LZa-Gy-akP" secondAttribute="leading" constant="16" id="oAS-CR-Mkt"/>
<constraint firstItem="NwB-tL-w2R" firstAttribute="top" secondItem="LZa-Gy-akP" secondAttribute="top" constant="14" id="p2r-EU-WTE"/>
<constraint firstItem="Iih-wx-HWd" firstAttribute="leading" secondItem="NwB-tL-w2R" secondAttribute="trailing" constant="16" id="r3D-nT-DnG"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="anq-ba-UQj">
<rect key="frame" x="0.0" y="149" width="414" height="64"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aPf-Rn-p74">
<rect key="frame" x="56" y="63" width="358" height="1"/>
<color key="backgroundColor" systemColor="separatorColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.28999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="M0d-Hd-6yC"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Divider"/>
</userDefinedRuntimeAttributes>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_booking_child" translatesAutoresizingMaskIntoConstraints="NO" id="Cdq-pg-7gf">
<rect key="frame" x="16" y="20" width="24" height="24"/>
<color key="tintColor" white="0.13233090750000001" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="OnL-Gt-bZB"/>
<constraint firstAttribute="width" constant="24" id="hKl-6X-TNP"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Children" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wr6-1j-Dsw">
<rect key="frame" x="56" y="10" width="234" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_children_title"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9lH-D3-kHh" customClass="ValueStepperView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="306" y="13" width="100" height="38"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="38" id="84Q-Ml-uR6"/>
<constraint firstAttribute="width" constant="100" id="QLu-c2-LGX"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="3 - 16 years old" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5sc-U2-ZDP">
<rect key="frame" x="56" y="33.5" width="234" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_children_subtitle"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Wr6-1j-Dsw" firstAttribute="top" secondItem="anq-ba-UQj" secondAttribute="top" constant="10" id="1dm-JZ-PiN"/>
<constraint firstItem="9lH-D3-kHh" firstAttribute="centerY" secondItem="anq-ba-UQj" secondAttribute="centerY" id="7H9-0j-tMf"/>
<constraint firstItem="aPf-Rn-p74" firstAttribute="leading" secondItem="anq-ba-UQj" secondAttribute="leading" constant="56" id="9LA-0S-UKK"/>
<constraint firstItem="9lH-D3-kHh" firstAttribute="leading" secondItem="Wr6-1j-Dsw" secondAttribute="trailing" constant="16" id="9uM-si-f98"/>
<constraint firstItem="5sc-U2-ZDP" firstAttribute="trailing" secondItem="Wr6-1j-Dsw" secondAttribute="trailing" id="Jci-Tc-Aws"/>
<constraint firstItem="Cdq-pg-7gf" firstAttribute="centerY" secondItem="anq-ba-UQj" secondAttribute="centerY" id="Pg8-O9-CTi"/>
<constraint firstItem="aPf-Rn-p74" firstAttribute="top" secondItem="5sc-U2-ZDP" secondAttribute="bottom" constant="10" id="Xrc-Im-Kc1"/>
<constraint firstAttribute="bottom" secondItem="aPf-Rn-p74" secondAttribute="bottom" id="fzF-zE-YAj"/>
<constraint firstAttribute="trailing" secondItem="9lH-D3-kHh" secondAttribute="trailing" constant="8" id="gSn-fH-Rm4"/>
<constraint firstItem="Wr6-1j-Dsw" firstAttribute="leading" secondItem="Cdq-pg-7gf" secondAttribute="trailing" constant="16" id="he4-IF-jej"/>
<constraint firstAttribute="trailing" secondItem="aPf-Rn-p74" secondAttribute="trailing" id="o8J-ge-Rnn"/>
<constraint firstItem="Cdq-pg-7gf" firstAttribute="leading" secondItem="anq-ba-UQj" secondAttribute="leading" constant="16" id="pne-xW-Ltc"/>
<constraint firstItem="5sc-U2-ZDP" firstAttribute="top" secondItem="Wr6-1j-Dsw" secondAttribute="bottom" constant="4" id="qL8-ck-aRX"/>
<constraint firstItem="5sc-U2-ZDP" firstAttribute="leading" secondItem="Wr6-1j-Dsw" secondAttribute="leading" id="t1Z-dF-yMg"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sXC-XH-KBh">
<rect key="frame" x="0.0" y="213" width="414" height="63"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_booking_infant" translatesAutoresizingMaskIntoConstraints="NO" id="hdJ-0V-roa">
<rect key="frame" x="16" y="19.5" width="24" height="24"/>
<color key="tintColor" white="0.13233090750000001" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="Jn6-vT-YDb"/>
<constraint firstAttribute="width" constant="24" id="uCv-qA-4Bs"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Infants" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aBx-bJ-dzK">
<rect key="frame" x="56" y="10" width="234" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_infants_title"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bxZ-h9-CGP" customClass="ValueStepperView" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="306" y="12.5" width="100" height="38"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="1IX-Nt-R6h"/>
<constraint firstAttribute="height" constant="38" id="ycS-ih-Kec"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="0 - 3 years old" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s1L-9S-yeM">
<rect key="frame" x="56" y="33.5" width="234" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="regular16:blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="guests_picker_infants_subtitle"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="s1L-9S-yeM" firstAttribute="leading" secondItem="aBx-bJ-dzK" secondAttribute="leading" id="8nt-8R-bic"/>
<constraint firstItem="aBx-bJ-dzK" firstAttribute="leading" secondItem="hdJ-0V-roa" secondAttribute="trailing" constant="16" id="FWg-hH-poB"/>
<constraint firstItem="hdJ-0V-roa" firstAttribute="leading" secondItem="sXC-XH-KBh" secondAttribute="leading" constant="16" id="FjA-rd-kNo"/>
<constraint firstAttribute="trailing" secondItem="bxZ-h9-CGP" secondAttribute="trailing" constant="8" id="Kry-QK-eot"/>
<constraint firstItem="bxZ-h9-CGP" firstAttribute="centerY" secondItem="sXC-XH-KBh" secondAttribute="centerY" id="OOO-UM-IJ9"/>
<constraint firstItem="s1L-9S-yeM" firstAttribute="trailing" secondItem="aBx-bJ-dzK" secondAttribute="trailing" id="aSi-LJ-kGA"/>
<constraint firstItem="hdJ-0V-roa" firstAttribute="centerY" secondItem="sXC-XH-KBh" secondAttribute="centerY" id="eEK-Fr-UaN"/>
<constraint firstItem="aBx-bJ-dzK" firstAttribute="top" secondItem="sXC-XH-KBh" secondAttribute="top" constant="10" id="iik-fX-UWu"/>
<constraint firstItem="bxZ-h9-CGP" firstAttribute="leading" secondItem="aBx-bJ-dzK" secondAttribute="trailing" constant="16" id="ixD-zq-0r1"/>
<constraint firstAttribute="bottom" secondItem="s1L-9S-yeM" secondAttribute="bottom" constant="10" id="zY1-tA-erm"/>
<constraint firstItem="s1L-9S-yeM" firstAttribute="top" secondItem="aBx-bJ-dzK" secondAttribute="bottom" constant="4" id="zjY-NQ-M77"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OfS-TX-VYl">
<rect key="frame" x="0.0" y="276" width="414" height="44"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bFt-QV-4xW">
<rect key="frame" x="16" y="0.0" width="50" height="44"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<state key="normal" title="Cancel"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="cancel"/>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="BookingDatePickerCancel"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onCancel:" destination="-1" eventType="touchUpInside" id="48U-HW-s2o"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fHT-lb-4BE">
<rect key="frame" x="358" y="0.0" width="40" height="44"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="16"/>
<state key="normal" title="Done"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="done"/>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="BookingDatePickerDone"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onDone:" destination="-1" eventType="touchUpInside" id="wfn-Vb-gfH"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="secondarySystemBackgroundColor" red="0.94901960780000005" green="0.94901960780000005" blue="0.96862745100000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="bFt-QV-4xW" firstAttribute="leading" secondItem="OfS-TX-VYl" secondAttribute="leading" constant="16" id="2Gl-z9-lO0"/>
<constraint firstAttribute="trailing" secondItem="fHT-lb-4BE" secondAttribute="trailing" constant="16" id="3kG-DN-oq6"/>
<constraint firstAttribute="height" constant="44" id="9C5-e4-7fm"/>
<constraint firstItem="fHT-lb-4BE" firstAttribute="top" secondItem="OfS-TX-VYl" secondAttribute="top" id="MH5-2A-564"/>
<constraint firstItem="bFt-QV-4xW" firstAttribute="top" secondItem="OfS-TX-VYl" secondAttribute="top" id="SfP-Wl-FUE"/>
<constraint firstAttribute="bottom" secondItem="fHT-lb-4BE" secondAttribute="bottom" id="Smw-14-s7P"/>
<constraint firstAttribute="bottom" secondItem="bFt-QV-4xW" secondAttribute="bottom" id="Vuk-vX-VYh"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Border"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="3ZC-cU-MNM" secondAttribute="bottom" id="AzB-Y2-R3U"/>
<constraint firstItem="3ZC-cU-MNM" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="VXy-sp-VfJ"/>
<constraint firstItem="3ZC-cU-MNM" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="j8c-dC-FdF"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="3ZC-cU-MNM" secondAttribute="trailing" id="lj2-YQ-0bF"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="styleName" value="Background"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="137.59999999999999" y="313.94302848575717"/>
</view>
</objects>
<resources>
<image name="ic_booking_child" width="20" height="20"/>
<image name="ic_booking_infant" width="20" height="21"/>
<image name="ic_booking_people" width="22" height="15"/>
<image name="ic_booking_room" width="20" height="13"/>
</resources>
</document>

View file

@ -33,7 +33,8 @@ using Observers = NSHashTable<Observer>;
UITextFieldDelegate,
MWMStorageObserver,
MWMSearchObserver,
DatePickerViewControllerDelegate>
DatePickerViewControllerDelegate,
GuestsPickerViewControllerDelegate>
@property(weak, nonatomic, readonly) UIViewController *ownerController;
@property(weak, nonatomic, readonly) UIView *searchViewContainer;
@ -134,7 +135,9 @@ using Observers = NSHashTable<Observer>;
- (IBAction)onBookingGuestsButtonPressed:(id)sender {
[self.searchTextField resignFirstResponder];
[self.searchBarView setGuestCount:1];
GuestsPickerViewController *controller = [[GuestsPickerViewController alloc] init];
controller.delegate = self;
[[MapViewController sharedController] presentViewController:controller animated:YES completion:nil];
}
#pragma mark - Layout
@ -400,6 +403,24 @@ didSelectStartDate:(NSDate *)startDate
[[MapViewController sharedController] dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - GuestsPickerViewControllerDelegate
- (void)guestsPicker:(GuestsPickerViewController *)guestsPicker
didSelectRooms:(NSInteger)rooms
adults:(NSInteger)adults
children:(NSInteger)children
infants:(NSInteger)infants {
[self.searchBarView setGuestCount:adults + children + infants];
MWMHotelParams *filter = [MWMSearch getFilter];
// TODO: set number of guests to filter
[MWMSearch updateHotelFilterWithParams:filter];
[[MapViewController sharedController] dismissViewControllerAnimated:YES completion:nil];
}
- (void)guestsPickerDidCancel:(GuestsPickerViewController *)guestsPicker {
[[MapViewController sharedController] dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - Filters
- (IBAction)changeMode {

View file

@ -0,0 +1,82 @@
final class ValueStepperView: UIView {
var minValue = 0 {
didSet {
guard minValue <= maxValue else { fatalError() }
value = max(value, minValue)
}
}
var maxValue = 100 {
didSet {
guard maxValue >= minValue else { fatalError() }
value = min(value, maxValue)
}
}
var value = 0 {
didSet {
guard value <= maxValue && value >= minValue else { fatalError() }
minusButton.isEnabled = value > minValue
plusButton.isEnabled = value < maxValue
valueLabel.text = "\(value)"
}
}
let minusButton = MWMButton(type: .custom)
let plusButton = MWMButton(type: .custom)
let valueLabel = UILabel()
private var viewConstraints: [NSLayoutConstraint]!
override init(frame: CGRect) {
super.init(frame: frame)
configure()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
configure()
}
private func configure() {
addSubview(minusButton)
addSubview(valueLabel)
addSubview(plusButton)
minusButton.translatesAutoresizingMaskIntoConstraints = false
valueLabel.translatesAutoresizingMaskIntoConstraints = false
plusButton.translatesAutoresizingMaskIntoConstraints = false
valueLabel.textAlignment = .center
minusButton.isEnabled = false
minusButton.setImage(UIImage(named: "ic_booking_minus"), for: .normal)
plusButton.setImage(UIImage(named: "ic_booking_plus"), for: .normal)
valueLabel.text = "\(value)"
minusButton.addTarget(self, action: #selector(onMinus(_:)), for: .touchUpInside)
plusButton.addTarget(self, action: #selector(onPlus(_:)), for: .touchUpInside)
NSLayoutConstraint.activate([
minusButton.leadingAnchor.constraint(equalTo: leadingAnchor),
valueLabel.leadingAnchor.constraint(equalTo: minusButton.trailingAnchor),
plusButton.leadingAnchor.constraint(equalTo: valueLabel.trailingAnchor),
plusButton.trailingAnchor.constraint(equalTo: trailingAnchor),
valueLabel.topAnchor.constraint(equalTo: topAnchor),
valueLabel.bottomAnchor.constraint(equalTo: bottomAnchor),
minusButton.topAnchor.constraint(equalTo: topAnchor),
minusButton.bottomAnchor.constraint(equalTo: bottomAnchor),
plusButton.topAnchor.constraint(equalTo: topAnchor),
plusButton.bottomAnchor.constraint(equalTo: bottomAnchor),
minusButton.widthAnchor.constraint(equalTo: minusButton.heightAnchor, multiplier: 1),
plusButton.widthAnchor.constraint(equalTo: plusButton.heightAnchor, multiplier: 1)
])
}
@objc func onMinus(_ sender: UIButton) {
value -= 1
}
@objc func onPlus(_ sender: UIButton) {
value += 1
}
}