[iOS] add single item catalog promo to place page

https://jira.mail.ru/browse/MAPSME-11835
This commit is contained in:
Aleksey Belouosv 2019-09-13 16:58:36 +03:00 committed by Arsentiy Milchakov
parent b94edda47a
commit 99232ad038
12 changed files with 482 additions and 39 deletions

View file

@ -25,6 +25,7 @@
#import "BookmarksVC.h"
#import "FacebookNativeAdAdapter.h"
#import "LocalNotificationManager.h"
#import "CatalogPromoItem.h"
#import "CoreNotificationWrapper.h"
#import "DeepLinkHelper.h"
#import "MapViewController.h"

View file

@ -383,6 +383,12 @@
4728F69022CE430800E00028 /* BookmarksSubscriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */; };
4728F69122CE430800E00028 /* BookmarksSubscriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */; };
4728F69322CF89A400E00028 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4728F69222CF89A400E00028 /* GradientView.swift */; };
472C40E4232A7B9F009AA777 /* CatalogSingleItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472C40E2232A7B9F009AA777 /* CatalogSingleItemCell.swift */; };
472C40E5232A7B9F009AA777 /* CatalogSingleItemCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 472C40E3232A7B9F009AA777 /* CatalogSingleItemCell.xib */; };
472C40E8232BA810009AA777 /* CatalogPromoItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 472C40E7232BA810009AA777 /* CatalogPromoItem.m */; };
472C40EB232BAE20009AA777 /* CatalogPromoItem+Core.mm in Sources */ = {isa = PBXBuildFile; fileRef = 472C40EA232BAE20009AA777 /* CatalogPromoItem+Core.mm */; };
472C40EE232BC4E5009AA777 /* EmptyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472C40EC232BC4E5009AA777 /* EmptyTableViewCell.swift */; };
472C40EF232BC4E5009AA777 /* EmptyTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 472C40ED232BC4E5009AA777 /* EmptyTableViewCell.xib */; };
472E3F472146BCD30020E412 /* SubscriptionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F462146BCD30020E412 /* SubscriptionManager.swift */; };
472E3F4A2146C4CD0020E412 /* MWMPurchaseManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F492146C4CD0020E412 /* MWMPurchaseManager.mm */; };
472E3F4C2147D5700020E412 /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 472E3F4B2147D5700020E412 /* Subscription.swift */; };
@ -1475,6 +1481,14 @@
4728F68E22CE430800E00028 /* BookmarksSubscriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksSubscriptionViewController.swift; sourceTree = "<group>"; };
4728F68F22CE430800E00028 /* BookmarksSubscriptionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BookmarksSubscriptionViewController.xib; sourceTree = "<group>"; };
4728F69222CF89A400E00028 /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = GradientView.swift; path = CustomViews/GradientView.swift; sourceTree = "<group>"; };
472C40E2232A7B9F009AA777 /* CatalogSingleItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatalogSingleItemCell.swift; sourceTree = "<group>"; };
472C40E3232A7B9F009AA777 /* CatalogSingleItemCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CatalogSingleItemCell.xib; sourceTree = "<group>"; };
472C40E6232BA810009AA777 /* CatalogPromoItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CatalogPromoItem.h; sourceTree = "<group>"; };
472C40E7232BA810009AA777 /* CatalogPromoItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CatalogPromoItem.m; sourceTree = "<group>"; };
472C40E9232BAE20009AA777 /* CatalogPromoItem+Core.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CatalogPromoItem+Core.h"; sourceTree = "<group>"; };
472C40EA232BAE20009AA777 /* CatalogPromoItem+Core.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "CatalogPromoItem+Core.mm"; sourceTree = "<group>"; };
472C40EC232BC4E5009AA777 /* EmptyTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTableViewCell.swift; sourceTree = "<group>"; };
472C40ED232BC4E5009AA777 /* EmptyTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EmptyTableViewCell.xib; sourceTree = "<group>"; };
472E3F462146BCD30020E412 /* SubscriptionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionManager.swift; sourceTree = "<group>"; };
472E3F482146C4CD0020E412 /* MWMPurchaseManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPurchaseManager.h; sourceTree = "<group>"; };
472E3F492146C4CD0020E412 /* MWMPurchaseManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPurchaseManager.mm; sourceTree = "<group>"; };
@ -3537,6 +3551,21 @@
path = TipsAndTricks;
sourceTree = "<group>";
};
472C40E1232A7B4F009AA777 /* CatalogPromo */ = {
isa = PBXGroup;
children = (
472C40E2232A7B9F009AA777 /* CatalogSingleItemCell.swift */,
472C40E3232A7B9F009AA777 /* CatalogSingleItemCell.xib */,
472C40E6232BA810009AA777 /* CatalogPromoItem.h */,
472C40E7232BA810009AA777 /* CatalogPromoItem.m */,
472C40E9232BAE20009AA777 /* CatalogPromoItem+Core.h */,
472C40EA232BAE20009AA777 /* CatalogPromoItem+Core.mm */,
472C40EC232BC4E5009AA777 /* EmptyTableViewCell.swift */,
472C40ED232BC4E5009AA777 /* EmptyTableViewCell.xib */,
);
path = CatalogPromo;
sourceTree = "<group>";
};
472E3F4221468AF40020E412 /* Subscriptions */ = {
isa = PBXGroup;
children = (
@ -4389,6 +4418,7 @@
F6E2FCA81E097B9F0083EBEC /* Content */ = {
isa = PBXGroup;
children = (
472C40E1232A7B4F009AA777 /* CatalogPromo */,
33010DB121B7E0E000925411 /* DescriptionCell */,
F68224981E5B0FE100BC1C18 /* BookingCells */,
F6E2FCA91E097B9F0083EBEC /* BookmarkCell */,
@ -4899,6 +4929,7 @@
6741A9591BF340DE002C974C /* 05_khmeros.ttf in Resources */,
34AB66801FC5AA330078E451 /* MWMiPhoneRoutePreview.xib in Resources */,
F6D67CEB2069318B0032FD38 /* PPPSearchSimilarButton.xib in Resources */,
472C40EF232BC4E5009AA777 /* EmptyTableViewCell.xib in Resources */,
F61757F11FC731F5000AD0D0 /* DiscoveryOnlineTemplateCell.xib in Resources */,
6741A95B1BF340DE002C974C /* 06_code2000.ttf in Resources */,
F603E05E1FDE9703006B84D6 /* DiscoverySearchCollectionHolderCell.xib in Resources */,
@ -4906,6 +4937,7 @@
6741A99F1BF340DE002C974C /* 07_roboto_medium.ttf in Resources */,
F6E2FE6D1E097BA00083EBEC /* _MWMOHHeaderCell.xib in Resources */,
F6E2FE701E097BA00083EBEC /* _MWMOHSubCell.xib in Resources */,
472C40E5232A7B9F009AA777 /* CatalogSingleItemCell.xib in Resources */,
F6E2FEA91E097BA00083EBEC /* _MWMPPPAddress.xib in Resources */,
4716EAC121A6E0570029B886 /* BookmarksVC.xib in Resources */,
F6E2FEAC1E097BA00083EBEC /* PPPReview.xib in Resources */,
@ -5302,6 +5334,7 @@
3404F48B202894EA0090E401 /* BMCViewController.swift in Sources */,
349D1ABC1E2D05EF004A2006 /* SearchBar.swift in Sources */,
F6E2FD7A1E097BA00083EBEC /* MWMMapDownloaderDefaultDataSource.mm in Sources */,
472C40EE232BC4E5009AA777 /* EmptyTableViewCell.swift in Sources */,
34E50DF81F6FCC96008EED49 /* UGCReviewCell.swift in Sources */,
F6E2FF3F1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */,
F6E2FDE01E097BA00083EBEC /* MWMEditorViewController.mm in Sources */,
@ -5401,6 +5434,7 @@
340475531E081A4600C92850 /* MWMCustomFacebookEvents.mm in Sources */,
349D1CE41E3F836900A878FD /* UIViewController+Hierarchy.swift in Sources */,
CDB4D4E1222D70DF00104869 /* CarPlayMapViewController.swift in Sources */,
472C40EB232BAE20009AA777 /* CatalogPromoItem+Core.mm in Sources */,
347039A91FB9A5CF00E47496 /* MWMBookmarksManager.mm in Sources */,
F692F3831EA0FAF5001E82EB /* MWMAutoupdateController.mm in Sources */,
34574A671E3B85F80061E839 /* ThemeManager.swift in Sources */,
@ -5473,6 +5507,7 @@
34BBD65C1F826FD30070CA50 /* AuthorizationiPhonePresentationController.swift in Sources */,
56C74C391C74A3BC00B71B9F /* MWMInputEmailValidator.mm in Sources */,
6741A9F51BF340DE002C974C /* BookmarksVC.mm in Sources */,
472C40E4232A7B9F009AA777 /* CatalogSingleItemCell.swift in Sources */,
B33D21B820E130D000BAD749 /* BookmarksTabViewController.swift in Sources */,
3404754A1E081A4600C92850 /* AppInfo.mm in Sources */,
3358607E217632A2006D11F2 /* BookmarksSharingViewController.swift in Sources */,
@ -5676,6 +5711,7 @@
34AB661D1FC5AA330078E451 /* MWMTaxiPreviewDataSource.mm in Sources */,
F69CE8D61E5C49B4002B5881 /* PPHotelCarouselCell.swift in Sources */,
47B9065321C7FA400079C85E /* MWMImageCache.m in Sources */,
472C40E8232BA810009AA777 /* CatalogPromoItem.m in Sources */,
F6FEA82E1C58F108007223CC /* MWMButton.mm in Sources */,
3445324E1F714FD70059FBCC /* UGCAddReviewController.swift in Sources */,
34B924431DC8A29C0008D971 /* MWMMailViewController.mm in Sources */,

View file

@ -472,12 +472,7 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
auto editSession = bmManager.GetEditSession();
auto const * bookmark = editSession.CreateBookmark(std::move(bmData), categoryId);
f.FillBookmarkInfo(*bookmark, m_info);
NSUInteger position = [self bookmarkSectionPosition];
if (self.isPromoCatalog) {
m_sections.insert(m_sections.begin() + position, Sections::Bookmark);
} else {
m_sections.insert(m_sections.begin() + position, Sections::Bookmark);
}
m_sections.insert(m_sections.begin() + [self bookmarkSectionPosition], Sections::Bookmark);
}
else
{
@ -831,7 +826,8 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
- (BOOL)isOpentable { return m_info.GetSponsoredType() == SponsoredType::Opentable; }
- (BOOL)isPartner { return m_info.GetSponsoredType() == SponsoredType::Partner; }
- (BOOL)isHolidayObject { return m_info.GetSponsoredType() == SponsoredType::Holiday; }
- (BOOL)isPromoCatalog { return m_info.GetSponsoredType() == SponsoredType::PromoCatalogCity; }
- (BOOL)isPromoCatalog { return m_info.GetSponsoredType() == SponsoredType::PromoCatalogCity
|| m_info.GetSponsoredType() == SponsoredType::PromoCatalogSightseeings; }
- (BOOL)isBookingSearch { return !m_info.GetBookingSearchUrl().empty(); }
- (BOOL)isMyPosition { return m_info.IsMyPosition(); }
- (BOOL)isHTMLDescription { return strings::IsHTML(GetPreferredBookmarkStr(m_info.GetBookmarkData().m_description)); }
@ -933,8 +929,16 @@ NSString * const kUserDefaultsLatLonAsDMSKey = @"UserDefaultsLatLonAsDMS";
};
auto appInfo = AppInfo.sharedInfo;
auto locale = appInfo.twoLetterLanguageId.UTF8String;
//TODO: set correct UTM
api->GetCityGallery(self.mercator, locale, UTM::LargeToponymsPlacepageGallery, resultHandler, errorHandler);
if (m_info.GetSponsoredType() == SponsoredType::PromoCatalogCity) {
api->GetCityGallery(self.mercator, locale, UTM::LargeToponymsPlacepageGallery, resultHandler, errorHandler);
} else {
api->GetPoiGallery(self.mercator, locale,
m_info.GetRawTypes(),
[MWMFrameworkHelper isWiFiConnected],
UTM::SightseeingsPlacepageGallery,
resultHandler,
errorHandler);
}
}
if (self.refreshPromoCallback) {

View file

@ -0,0 +1,13 @@
#import "CatalogPromoItem.h"
#include "partners_api/promo_api.hpp"
NS_ASSUME_NONNULL_BEGIN
@interface CatalogPromoItem (Core)
- (instancetype)initWithCoreItem:(promo::CityGallery::Item const &)item;
@end
NS_ASSUME_NONNULL_END

View file

@ -0,0 +1,18 @@
#import "CatalogPromoItem+Core.h"
@implementation CatalogPromoItem (Core)
- (instancetype)initWithCoreItem:(promo::CityGallery::Item const &)item {
self = [super init];
if (self) {
self.placeTitle = @(item.m_place.m_name.c_str());
self.placeDescription = @(item.m_place.m_description.c_str());
self.imageUrl = @(item.m_imageUrl.c_str());
self.catalogUrl = @(item.m_url.c_str());
self.guideName = @(item.m_name.c_str());
self.guideAuthor = @(item.m_author.m_name.c_str());
}
return self;
}
@end

View file

@ -0,0 +1,14 @@
NS_ASSUME_NONNULL_BEGIN
@interface CatalogPromoItem : NSObject
@property(nonatomic, copy) NSString *placeTitle;
@property(nonatomic, copy) NSString *placeDescription;
@property(nonatomic, copy) NSString *imageUrl;
@property(nonatomic, copy) NSString *catalogUrl;
@property(nonatomic, copy) NSString *guideName;
@property(nonatomic, copy) NSString *guideAuthor;
@end
NS_ASSUME_NONNULL_END

View file

@ -0,0 +1,5 @@
#import "CatalogPromoItem.h"
@implementation CatalogPromoItem
@end

View file

@ -0,0 +1,41 @@
@objc class CatalogSingleItemCell: UITableViewCell {
@IBOutlet var placeTitleLabel: UILabel!
@IBOutlet var placeDescriptionLabel: UILabel!
@IBOutlet var guideNameLabel: UILabel!
@IBOutlet var guideAuthorLabel: UILabel!
@IBOutlet var moreButton: UIButton!
@IBOutlet var placeImageView: UIImageView!
@IBOutlet var openCatalogButton: UIButton!
@IBOutlet var moreButtonHeightConstraint: NSLayoutConstraint!
@IBOutlet var guideContainerView: UIView!
@objc var onMore: MWMVoidBlock?
@objc var onGoToCatalog: MWMVoidBlock?
override func awakeFromNib() {
super.awakeFromNib()
guideContainerView.layer.borderColor = UIColor.blackDividers()?.cgColor
}
@objc func config(_ promoItem: CatalogPromoItem) {
placeTitleLabel.text = promoItem.placeTitle
placeDescriptionLabel.text = promoItem.placeDescription
guideNameLabel.text = promoItem.guideName
guideAuthorLabel.text = promoItem.guideAuthor
guard let url = URL(string: promoItem.imageUrl) else {
return
}
placeImageView.wi_setImage(with: url)
}
@IBAction func onMoreButton(_ sender: UIButton) {
moreButton.isHidden = true
moreButtonHeightConstraint.constant = 0
placeDescriptionLabel.numberOfLines = 0
onMore?()
}
@IBAction func onCatalogButton(_ sender: UIButton) {
onGoToCatalog?()
}
}

View file

@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="379" id="KGk-i7-Jjw" customClass="CatalogSingleItemCell" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="454"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="375" height="453.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="THIS PLACE IN GUIDES CATALOG" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bhy-Em-Lsy">
<rect key="frame" x="16" y="0.0" width="351" height="48"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="gtd-gt-qrH"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" white="0.0" alpha="0.54000000000000004" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kay-Ql-Q4u">
<rect key="frame" x="0.0" y="48" width="375" height="175.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Государственный музей изобразительных искусств имени А.С. Пушкина" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tjG-Xk-PW2">
<rect key="frame" x="16" y="16" width="343" height="33.5"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kpd-Fx-T2M">
<rect key="frame" x="16" y="57.5" width="343" height="84"/>
<string key="text">музейный комплекс, обладающий одим из крупнейших в России художественных собраний зарубежного искусства. хранящий артефакты, созданные мастерами разных эпох - от Древнего Египта и античной Греции до наших...</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="88F-wd-Imb">
<rect key="frame" x="16" y="141.5" width="343" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="rDb-rD-JRG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="...more">
<color key="titleColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onMoreButton:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="SJG-1o-t1H"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="88F-wd-Imb" secondAttribute="trailing" constant="16" id="73A-q6-tAz"/>
<constraint firstItem="kpd-Fx-T2M" firstAttribute="bottom" secondItem="88F-wd-Imb" secondAttribute="top" id="7Gt-Kz-poP"/>
<constraint firstItem="kpd-Fx-T2M" firstAttribute="leading" secondItem="kay-Ql-Q4u" secondAttribute="leading" constant="16" id="CCp-zf-4IS"/>
<constraint firstItem="tjG-Xk-PW2" firstAttribute="leading" secondItem="kay-Ql-Q4u" secondAttribute="leading" constant="16" id="Go3-Yq-c0h"/>
<constraint firstAttribute="trailing" secondItem="tjG-Xk-PW2" secondAttribute="trailing" constant="16" id="b0i-hn-Hxq"/>
<constraint firstAttribute="trailing" secondItem="kpd-Fx-T2M" secondAttribute="trailing" constant="16" id="n5t-Nq-zfJ"/>
<constraint firstItem="88F-wd-Imb" firstAttribute="leading" secondItem="kay-Ql-Q4u" secondAttribute="leading" constant="16" id="oOE-MR-E9Q"/>
<constraint firstItem="kpd-Fx-T2M" firstAttribute="top" secondItem="tjG-Xk-PW2" secondAttribute="bottom" constant="8" id="qTs-xs-PmG"/>
<constraint firstItem="tjG-Xk-PW2" firstAttribute="top" secondItem="kay-Ql-Q4u" secondAttribute="top" constant="16" id="rh5-PZ-qDd"/>
<constraint firstAttribute="bottom" secondItem="88F-wd-Imb" secondAttribute="bottom" priority="750" constant="4" id="zlw-mE-wCH"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="evd-YR-GpP">
<rect key="frame" x="0.0" y="224" width="375" height="230"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ghb-tP-72g">
<rect key="frame" x="8" y="8" width="359" height="214"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0uF-jB-pU1">
<rect key="frame" x="0.0" y="0.0" width="179.5" height="214"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="o8R-cD-WTy">
<rect key="frame" x="179.5" y="0.0" width="179.5" height="214"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ze9-RJ-Rq3">
<rect key="frame" x="8" y="166" width="163.5" height="40"/>
<color key="backgroundColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Gyf-59-hAU">
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<state key="normal" title="View"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueHighlighted"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="pp_discovery_place_related_cta_button"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="onCatalogButton:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="R6p-sj-fF0"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HbZ-ve-HXd">
<rect key="frame" x="8" y="8" width="164" height="150"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6DT-fQ-3vs">
<rect key="frame" x="0.0" y="23.5" width="164" height="103.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Государственный музей изобразительных искусств имени А.С. Пушкина" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="upe-j8-l1G">
<rect key="frame" x="0.0" y="0.0" width="164" height="84"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ArrivalGuides" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Waz-Lf-ctY">
<rect key="frame" x="0.0" y="89" width="164" height="14.5"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular12"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Waz-Lf-ctY" firstAttribute="leading" secondItem="6DT-fQ-3vs" secondAttribute="leading" id="1tU-G6-BSG"/>
<constraint firstAttribute="trailing" secondItem="Waz-Lf-ctY" secondAttribute="trailing" id="2R6-46-cEL"/>
<constraint firstAttribute="trailing" secondItem="upe-j8-l1G" secondAttribute="trailing" id="5xd-Sx-liP"/>
<constraint firstItem="upe-j8-l1G" firstAttribute="top" secondItem="6DT-fQ-3vs" secondAttribute="top" id="80W-jL-oOy"/>
<constraint firstItem="upe-j8-l1G" firstAttribute="leading" secondItem="6DT-fQ-3vs" secondAttribute="leading" id="RHu-zB-VtC"/>
<constraint firstItem="Waz-Lf-ctY" firstAttribute="top" secondItem="upe-j8-l1G" secondAttribute="bottom" constant="5" id="f50-Yt-aRG"/>
<constraint firstAttribute="bottom" secondItem="Waz-Lf-ctY" secondAttribute="bottom" priority="750" id="ger-Jg-y9b"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="6DT-fQ-3vs" firstAttribute="top" relation="greaterThanOrEqual" secondItem="HbZ-ve-HXd" secondAttribute="top" id="9Rd-1H-pHc"/>
<constraint firstItem="6DT-fQ-3vs" firstAttribute="leading" secondItem="HbZ-ve-HXd" secondAttribute="leading" id="R7d-As-wQl"/>
<constraint firstAttribute="trailing" secondItem="6DT-fQ-3vs" secondAttribute="trailing" id="ad4-VA-mmy"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="6DT-fQ-3vs" secondAttribute="bottom" id="nve-Qv-YAk"/>
<constraint firstItem="6DT-fQ-3vs" firstAttribute="centerY" secondItem="HbZ-ve-HXd" secondAttribute="centerY" id="uUw-Oa-fis"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="ze9-RJ-Rq3" secondAttribute="trailing" constant="8" id="1nZ-QE-Jl9"/>
<constraint firstItem="HbZ-ve-HXd" firstAttribute="top" secondItem="o8R-cD-WTy" secondAttribute="top" constant="8" id="ES2-1c-rqP"/>
<constraint firstItem="HbZ-ve-HXd" firstAttribute="leading" secondItem="o8R-cD-WTy" secondAttribute="leading" constant="8" id="Hl2-pb-KTL"/>
<constraint firstItem="ze9-RJ-Rq3" firstAttribute="leading" secondItem="o8R-cD-WTy" secondAttribute="leading" constant="8" id="NLz-HH-JBM"/>
<constraint firstAttribute="trailing" secondItem="HbZ-ve-HXd" secondAttribute="trailing" constant="7.5" id="dBa-G7-DyF"/>
<constraint firstAttribute="bottom" secondItem="ze9-RJ-Rq3" secondAttribute="bottom" constant="8" id="w4e-Ys-oD8"/>
<constraint firstItem="ze9-RJ-Rq3" firstAttribute="top" secondItem="HbZ-ve-HXd" secondAttribute="bottom" constant="8" id="x1n-Uz-e5W"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="o8R-cD-WTy" firstAttribute="width" secondItem="0uF-jB-pU1" secondAttribute="width" id="7wv-s9-z2C"/>
<constraint firstItem="o8R-cD-WTy" firstAttribute="top" secondItem="Ghb-tP-72g" secondAttribute="top" id="DGt-0I-uvZ"/>
<constraint firstAttribute="bottom" secondItem="0uF-jB-pU1" secondAttribute="bottom" id="GmC-ZU-HJX"/>
<constraint firstItem="0uF-jB-pU1" firstAttribute="top" secondItem="Ghb-tP-72g" secondAttribute="top" id="JVp-6B-17T"/>
<constraint firstItem="o8R-cD-WTy" firstAttribute="leading" secondItem="0uF-jB-pU1" secondAttribute="trailing" id="PKV-gN-N3x"/>
<constraint firstAttribute="bottom" secondItem="o8R-cD-WTy" secondAttribute="bottom" id="QzU-gd-PoE"/>
<constraint firstAttribute="trailing" secondItem="o8R-cD-WTy" secondAttribute="trailing" id="RAn-Mh-44b"/>
<constraint firstItem="0uF-jB-pU1" firstAttribute="leading" secondItem="Ghb-tP-72g" secondAttribute="leading" id="gf1-gA-kSp"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Ghb-tP-72g" secondAttribute="trailing" constant="8" id="0Tc-T2-xBa"/>
<constraint firstAttribute="width" secondItem="evd-YR-GpP" secondAttribute="height" multiplier="375:230" id="4eY-3E-zji"/>
<constraint firstItem="Ghb-tP-72g" firstAttribute="top" secondItem="evd-YR-GpP" secondAttribute="top" constant="8" id="jCO-Nq-jHN"/>
<constraint firstAttribute="bottom" secondItem="Ghb-tP-72g" secondAttribute="bottom" constant="8" id="kRD-fP-4Jt"/>
<constraint firstItem="Ghb-tP-72g" firstAttribute="leading" secondItem="evd-YR-GpP" secondAttribute="leading" constant="8" id="od2-jM-7hy"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="kay-Ql-Q4u" secondAttribute="trailing" id="8SD-Ku-wKV"/>
<constraint firstItem="kay-Ql-Q4u" firstAttribute="top" secondItem="Bhy-Em-Lsy" secondAttribute="bottom" id="A0q-UZ-3c0"/>
<constraint firstAttribute="trailing" secondItem="Bhy-Em-Lsy" secondAttribute="trailing" constant="8" id="AUz-U2-KYy"/>
<constraint firstAttribute="trailing" secondItem="evd-YR-GpP" secondAttribute="trailing" id="BJC-oG-cu7"/>
<constraint firstItem="Bhy-Em-Lsy" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Edf-ct-YWL"/>
<constraint firstItem="evd-YR-GpP" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="KZv-Zk-DWv"/>
<constraint firstAttribute="bottom" secondItem="evd-YR-GpP" secondAttribute="bottom" constant="-0.5" id="QaL-1H-QL7"/>
<constraint firstItem="Bhy-Em-Lsy" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="ZB3-X6-FpP"/>
<constraint firstItem="evd-YR-GpP" firstAttribute="top" secondItem="kay-Ql-Q4u" secondAttribute="bottom" constant="0.5" id="arD-or-Jjt"/>
<constraint firstItem="kay-Ql-Q4u" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="fQx-Oz-tPS"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="guideAuthorLabel" destination="Waz-Lf-ctY" id="T4F-L6-HTu"/>
<outlet property="guideContainerView" destination="Ghb-tP-72g" id="aHA-6o-eAq"/>
<outlet property="guideNameLabel" destination="upe-j8-l1G" id="glR-SC-J3U"/>
<outlet property="moreButton" destination="88F-wd-Imb" id="f6t-sm-CHR"/>
<outlet property="moreButtonHeightConstraint" destination="rDb-rD-JRG" id="gsR-hZ-ucq"/>
<outlet property="openCatalogButton" destination="ze9-RJ-Rq3" id="8aT-Dt-HuW"/>
<outlet property="placeDescriptionLabel" destination="kpd-Fx-T2M" id="Lxc-RG-H5c"/>
<outlet property="placeImageView" destination="0uF-jB-pU1" id="i7t-iy-IMY"/>
<outlet property="placeTitleLabel" destination="tjG-Xk-PW2" id="CEX-4c-lSg"/>
</connections>
<point key="canvasLocation" x="177.536231884058" y="15.066964285714285"/>
</tableViewCell>
</objects>
</document>

View file

@ -0,0 +1,2 @@
@objc class EmptyTableViewCell: UITableViewCell {
}

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<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"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="0.0" id="KGk-i7-Jjw" customClass="EmptyTableViewCell" customModule="maps_me" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="1.1920928955078125e-07"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="-0.49999988079071045" width="320" height="0.49999988079071045"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pmb-Cs-neF">
<rect key="frame" x="0.0" y="0.0" width="320" height="0.0"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" id="9XA-ED-KXN"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="pmb-Cs-neF" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Bi3-hh-QTf"/>
<constraint firstAttribute="bottom" secondItem="pmb-Cs-neF" secondAttribute="bottom" id="Cd5-f8-eKa"/>
<constraint firstItem="pmb-Cs-neF" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="FdP-AO-caV"/>
<constraint firstAttribute="trailing" secondItem="pmb-Cs-neF" secondAttribute="trailing" id="kZL-kY-OP9"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<point key="canvasLocation" x="-1.4492753623188408" y="62.946428571428569"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,3 +1,4 @@
#import "CatalogPromoItem+Core.h"
#import "MWMPlacePageLayout.h"
#import "MWMBookmarkCell.h"
#import "MWMDiscoveryCityGalleryObjects.h"
@ -108,8 +109,9 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
[tv registerWithCellClass:[MWMUGCAddReviewCell class]];
[tv registerWithCellClass:[MWMUGCYourReviewCell class]];
[tv registerWithCellClass:[MWMUGCReviewCell class]];
[tv registerWithCellClass:[MWMDiscoveryOnlineTemplateCell class]];
[tv registerWithCellClass:[EmptyTableViewCell class]];
[tv registerWithCellClass:[MWMDiscoveryGuideCollectionHolderCell class]];
[tv registerWithCellClass:[CatalogSingleItemCell class]];
// Register all meta info cells.
for (auto const & pair : kMetaInfoCells)
@ -634,37 +636,36 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
{
auto rows = self.data.promoCatalogRows;
if (rows.empty() || rows[indexPath.row] != PromoCatalogRow::Guides) {
Class cls = [MWMDiscoveryOnlineTemplateCell class];
MWMDiscoveryOnlineTemplateCell * cell = (MWMDiscoveryOnlineTemplateCell *)[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
__weak __typeof__(self) weakSelf = self;
[cell configWithType:MWMDiscoveryOnlineTemplateTypePromo
needSpinner:rows.empty()
canUseNetwork: rows.empty() || rows[indexPath.row] == PromoCatalogRow::GuidesRequestError
tap:^{
__strong __typeof__(weakSelf) strongSelf = weakSelf;
if (MWMPlatform.networkConnectionType == MWMNetworkConnectionTypeNone) {
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
UIApplication * app = UIApplication.sharedApplication;
if ([app canOpenURL:url])
[app openURL:url options:@{} completionHandler:nil];
} else {
network_policy::CallPartnersApi([strongSelf](auto const & canUseNetwork) {
[strongSelf.data reguestPromoCatalog:canUseNetwork];
}, false, true);
}
}];
Class cls = [EmptyTableViewCell class];
EmptyTableViewCell * cell = (EmptyTableViewCell *)[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
return cell;
}
if (self.data.promoGallery.count == 1) {
CatalogSingleItemCell *cell = (CatalogSingleItemCell *)
[tableView dequeueReusableCellWithCellClass:CatalogSingleItemCell.class indexPath:indexPath];
CatalogPromoItem *item = [[CatalogPromoItem alloc] initWithCoreItem:[data.promoGallery galleryItemAtIndex:0]];
[cell config:item];
cell.onMore = ^{
[tableView beginUpdates];
[tableView endUpdates];
};
cell.onGoToCatalog = ^{
NSURL *url = [NSURL URLWithString:item.catalogUrl];
[self.delegate openCatalogForURL:url];
};
return cell;
} else {
Class cls = [MWMDiscoveryGuideCollectionHolderCell class];
MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *)
[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView;
[cell config];
collection.delegate = self;
collection.dataSource = self;
collection.itemType = discovery::ItemType::Promo;
[collection reloadData];
return cell;
}
Class cls = [MWMDiscoveryGuideCollectionHolderCell class];
MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *)
[tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath];
MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView;
[cell config];
collection.delegate = self;
collection.dataSource = self;
collection.itemType = discovery::ItemType::Promo;
[collection reloadData];
return cell;
}
}
}