diff --git a/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.h b/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.h index 789ed216b6..c2711b367c 100644 --- a/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.h +++ b/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.h @@ -11,6 +11,7 @@ typedef NS_ENUM(NSInteger, MWMBannerType) { MWMBannerTypeSkyeng, MWMBannerTypeBookmarkCatalog, MWMBannerTypeMastercardSberbank, + MWMBannerTypeCitymobil, }; NS_ASSUME_NONNULL_BEGIN diff --git a/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.mm b/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.mm index 12b8351aa8..480b843ebe 100644 --- a/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.mm +++ b/iphone/CoreApi/CoreApi/PlacePageData/Ad/CoreBanner.mm @@ -22,6 +22,8 @@ static MWMBannerType ConvertBannerType(ads::Banner::Type coreType) { return MWMBannerTypeBookmarkCatalog; case ads::Banner::Type::MastercardSberbank: return MWMBannerTypeMastercardSberbank; + case ads::Banner::Type::Citymobil: + return MWMBannerTypeCitymobil; } } diff --git a/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.h b/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.h index 5509fe6ecf..ac634fa437 100644 --- a/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.h +++ b/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.h @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray *)searchCategories; - (BOOL)hasMegafonCategoryBanner; - (NSURL *)megafonBannerUrl; +- (NSURL *)citymobilBannerUrl; - (BOOL)isSearchHistoryEmpty; - (NSArray *)lastSearchQueries; diff --git a/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.mm b/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.mm index 9b0d711d67..f855344791 100644 --- a/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.mm +++ b/iphone/CoreApi/CoreApi/Search/MWMSearchFrameworkHelper.mm @@ -1,5 +1,6 @@ #import "MWMSearchFrameworkHelper.h" +#include "partners_api/ads/ads_engine.hpp" #include "partners_api/megafon_countries.hpp" #include "platform/preferred_languages.hpp" @@ -44,6 +45,18 @@ return [NSURL URLWithString:@(urlStr.c_str())]; } +- (NSURL *)citymobilBannerUrl +{ + auto const & f = GetFramework(); + auto const pos = f.GetCurrentPosition(); + auto const banners = f.GetAdsEngine().GetSearchCategoryBanners(pos); + + if (banners.empty() || banners.begin()->m_type != ads::Banner::Type::Citymobil) + return [NSURL URLWithString:@("")];; + + return [NSURL URLWithString:@(banners.begin()->m_value.c_str())]; +} + - (BOOL)isSearchHistoryEmpty { return GetFramework().GetSearchAPI().GetLastSearchQueries().empty(); diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift index 35cc255454..d9103a5ae7 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewTaxiCell.swift @@ -15,7 +15,7 @@ final class RoutePreviewTaxiCell: UICollectionViewCell { case .vezet: return #imageLiteral(resourceName: "ic_taxi_logo_vezet") case .freenow: return #imageLiteral(resourceName: "ic_logo_freenow") case .yango: return #imageLiteral(resourceName: "ic_taxi_logo_yango") - case .citymobil: return #imageLiteral(resourceName: "ic_taxi_logo_citymobil") + case .citymobil: return #imageLiteral(resourceName: "ic_taxi_logo_citymobil_light") } } diff --git a/iphone/Maps/Core/Ads/MWMBannerHelpers.h b/iphone/Maps/Core/Ads/MWMBannerHelpers.h index 998569f138..1bd489a6c9 100644 --- a/iphone/Maps/Core/Ads/MWMBannerHelpers.h +++ b/iphone/Maps/Core/Ads/MWMBannerHelpers.h @@ -21,6 +21,7 @@ static inline MWMBannerType MatchBannerType(ads::Banner::Type coreType) case ads::Banner::Type::BookmarkCatalog: return MWMBannerTypeBookmarkCatalog; case ads::Banner::Type::MastercardSberbank: return MWMBannerTypeMastercardSberbank; + case ads::Banner::Type::Citymobil: return MWMBannerTypeCitymobil; } } diff --git a/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/Contents.json b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/Contents.json new file mode 100644 index 0000000000..859b843df0 --- /dev/null +++ b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "ic_taxi_logo_citymobil_dark.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/ic_taxi_logo_citymobil_dark.pdf b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/ic_taxi_logo_citymobil_dark.pdf new file mode 100644 index 0000000000..fc64855bc0 --- /dev/null +++ b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_dark.imageset/ic_taxi_logo_citymobil_dark.pdf @@ -0,0 +1,125 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 1.004761 6.638306 cm +0.819608 0.454902 0.164706 scn +0.542246 5.345305 m +0.243076 5.345305 0.000000 5.588382 0.000000 5.887552 c +0.000000 6.623011 0.000000 7.913180 0.000000 8.511520 c +0.000000 8.714084 0.087258 8.910414 0.239959 9.044417 c +0.645085 9.405914 1.461570 10.138257 1.900975 10.534034 c +2.072375 10.686735 2.327916 10.686735 2.499315 10.534034 c +2.941837 10.138257 3.758322 9.405914 4.160332 9.044417 c +4.313034 8.907297 4.400290 8.714084 4.400290 8.511520 c +4.400290 7.913180 4.400290 6.623011 4.400290 5.887552 c +4.400290 5.588382 4.157215 5.345305 3.858045 5.345305 c +3.010397 5.345305 1.386778 5.345305 0.542246 5.345305 c +h +18.137177 5.345305 m +17.838005 5.345305 17.594929 5.588382 17.594929 5.887552 c +17.594929 6.623011 17.594929 7.913180 17.594929 8.511520 c +17.594929 8.714084 17.682188 8.910414 17.834888 9.044417 c +18.240015 9.405914 19.056499 10.138257 19.495905 10.534034 c +19.667305 10.686735 19.922846 10.686735 20.094246 10.534034 c +20.536768 10.138257 21.353252 9.405914 21.755260 9.044417 c +21.907963 8.907297 21.995220 8.714084 21.995220 8.511520 c +21.995220 7.913180 21.995220 6.623011 21.995220 5.887552 c +21.995220 5.588382 21.752144 5.345305 21.452974 5.345305 c +20.608442 5.345305 18.984823 5.345305 18.137177 5.345305 c +h +9.339711 5.345305 m +9.040541 5.345305 8.797464 5.588382 8.797464 5.887552 c +8.797464 6.623011 8.797464 7.913180 8.797464 8.511520 c +8.797464 8.714084 8.884723 8.910414 9.037424 9.044417 c +9.442551 9.405914 10.259034 10.138257 10.698441 10.534034 c +10.869840 10.686735 11.125381 10.686735 11.296781 10.534034 c +11.739303 10.138257 12.555787 9.405914 12.957796 9.044417 c +13.110497 8.907297 13.197756 8.714084 13.197756 8.511520 c +13.197756 7.913180 13.197756 6.623011 13.197756 5.887552 c +13.197756 5.588382 12.954679 5.345305 12.655510 5.345305 c +11.807861 5.345305 10.184243 5.345305 9.339711 5.345305 c +h +13.740000 0.038157 m +13.440830 0.038157 13.197756 0.281233 13.197756 0.580403 c +13.197756 1.315863 13.197756 2.606030 13.197756 3.204370 c +13.197756 3.406933 13.285014 3.603265 13.437716 3.737268 c +13.842841 4.098765 14.659326 4.831108 15.098731 5.226884 c +15.270131 5.379586 15.525672 5.379586 15.697072 5.226884 c +16.139593 4.831108 16.956078 4.098765 17.358088 3.737268 c +17.510788 3.600148 17.598047 3.406933 17.598047 3.204370 c +17.598047 2.606030 17.598047 1.315863 17.598047 0.580403 c +17.598047 0.281233 17.354971 0.038157 17.055801 0.038157 c +16.208153 0.038157 14.584532 0.038157 13.740000 0.038157 c +h +8.255220 0.038157 m +4.939420 0.038157 l +4.640250 0.038157 4.397174 0.281233 4.397174 0.580403 c +4.397174 1.315863 4.397174 2.606030 4.397174 3.204370 c +4.397174 3.406933 4.484432 3.603265 4.637134 3.737268 c +5.042260 4.098765 5.858744 4.831108 6.298150 5.226884 c +6.469549 5.379586 6.725091 5.379586 6.896490 5.226884 c +7.339012 4.831108 8.155496 4.098765 8.557506 3.737268 c +8.710207 3.600148 8.797464 3.406933 8.797464 3.204370 c +8.797464 2.606030 8.797464 1.315863 8.797464 0.580403 c +8.797464 0.281233 8.554390 0.038157 8.255220 0.038157 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 3099 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.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 +0000000034 00000 n +0000003189 00000 n +0000003212 00000 n +0000003385 00000 n +0000003459 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +3518 +%%EOF \ No newline at end of file diff --git a/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil.imageset/Contents.json b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_light.imageset/Contents.json similarity index 100% rename from iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil.imageset/Contents.json rename to iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_light.imageset/Contents.json diff --git a/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil.imageset/ic_taxi_logo_citymobil.pdf b/iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_light.imageset/ic_taxi_logo_citymobil.pdf similarity index 100% rename from iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil.imageset/ic_taxi_logo_citymobil.pdf rename to iphone/Maps/Images.xcassets/ic_taxi_logo_citymobil_light.imageset/ic_taxi_logo_citymobil.pdf diff --git a/iphone/Maps/UI/PlacePage/Components/TaxiViewController.swift b/iphone/Maps/UI/PlacePage/Components/TaxiViewController.swift index ed543a861e..b3297bb68e 100644 --- a/iphone/Maps/UI/PlacePage/Components/TaxiViewController.swift +++ b/iphone/Maps/UI/PlacePage/Components/TaxiViewController.swift @@ -34,7 +34,7 @@ class TaxiViewController: UIViewController { taxiImageView.image = UIImage(named: "ic_taxi_logo_yango") taxiNameLabel.text = L("yango_taxi_title") case .citymobil: - taxiImageView.image = UIImage(named: "ic_taxi_logo_citymobil") + taxiImageView.image = UIImage(named: "ic_taxi_logo_citymobil_light") taxiNameLabel.text = L("citymobil_taxi_title") @unknown default: fatalError() diff --git a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.swift b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.swift index 07a7e800a8..e1d9411a0e 100644 --- a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.swift +++ b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.swift @@ -9,7 +9,7 @@ class SearchBannerCell: MWMTableViewCell { override func awakeFromNib() { super.awakeFromNib() - taxiImageView.mwm_name = "ic_megafon" + taxiImageView.mwm_name = "ic_taxi_logo_citymobil" } @IBAction private func onInstall(_ sender: UIButton) { diff --git a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.xib b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.xib index b93df6b95c..09089aa044 100644 --- a/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.xib +++ b/iphone/Maps/UI/Search/Tabs/CategoriesTab/SearchBannerCell.xib @@ -1,7 +1,9 @@ - + + - + + @@ -15,7 +17,7 @@ - + @@ -29,7 +31,7 @@ - +