diff options
author | Zoia Pribytkova <niakris90@gmail.com> | 2019-05-21 15:33:36 +0300 |
---|---|---|
committer | Aleksey Belousov <beloal@users.noreply.github.com> | 2019-05-22 15:34:29 +0300 |
commit | 452c372bfd643a6811f2389a92788a6b0bb0f714 (patch) | |
tree | aa1fc1487fdfc0c3e67e13d634fbd164f8d8cd87 /iphone | |
parent | f60cb4805f4a1318078915ad17fdec7146af10d5 (diff) |
[iOS] Booking.com button on the toolbar
Diffstat (limited to 'iphone')
3 files changed, 31 insertions, 0 deletions
diff --git a/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json new file mode 100644 index 0000000000..725d7e5511 --- /dev/null +++ b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icTypeHotel.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +}
\ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf Binary files differnew file mode 100644 index 0000000000..44d9c228a2 --- /dev/null +++ b/iphone/Maps/Images.xcassets/Bottom Menu/ic_menu_booking_search.imageset/icTypeHotel.pdf diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm index e9d97a9356..2b716b1f0b 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm @@ -28,6 +28,7 @@ CGFloat constexpr kLayoutThreshold = 420.0; typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { MWMBottomMenuViewCellAddPlace, MWMBottomMenuViewCellDownloadRoutes, + MWMBottomMenuViewCellBookingSearch, MWMBottomMenuViewCellDownloadMaps, MWMBottomMenuViewCellSettings, MWMBottomMenuViewCellShare, @@ -183,6 +184,12 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { case MWMBottomMenuViewCellDownloadRoutes: [cell configurePromoWithImageName:@"ic_menu_routes" label:L(@"download_guides")]; break; + case MWMBottomMenuViewCellBookingSearch: + [cell configureWithImageName:@"ic_menu_booking_search" + label:L(@"booking_button_toolbar") + badgeCount:0 + isEnabled:YES]; + break; case MWMBottomMenuViewCellDownloadMaps: [cell configureWithImageName:@"ic_menu_download" label:L(@"download_maps") @@ -218,6 +225,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { { case MWMBottomMenuViewCellAddPlace: [self menuActionAddPlace]; break; case MWMBottomMenuViewCellDownloadRoutes: [self menuActionDownloadRoutes]; break; + case MWMBottomMenuViewCellBookingSearch: [self menuActionBookingSearch]; break; case MWMBottomMenuViewCellDownloadMaps: [self menuActionDownloadMaps]; break; case MWMBottomMenuViewCellSettings: [self menuActionOpenSettings]; break; case MWMBottomMenuViewCellShare: [self menuActionShareLocation]; break; @@ -241,6 +249,14 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { [self.mapViewController openCatalogAnimated:YES]; } +- (void)menuActionBookingSearch +{ + [Statistics logEvent:kStatToolbarClick withParameters:@{kStatButton : kStatSearch}]; + self.state = MWMBottomMenuStateInactive; + [MWMMapViewControlsManager.manager searchTextOnMap:[L(@"booking_hotel") stringByAppendingString:@" "] + forInputLocale:[NSLocale currentLocale].localeIdentifier]; +} + - (void)menuActionDownloadMaps { [Statistics logEvent:kStatToolbarMenuClick withParameters:@{kStatItem : kStatDownloadMaps}]; |