[new downloader][ios] Added "near me" & "downloaded" sections.

This commit is contained in:
Ilya Grechuhin 2016-02-08 22:04:49 +03:00 committed by Sergey Yershov
parent 9e006c7ba9
commit 7ec3ee15a7
19 changed files with 188 additions and 410 deletions

View file

@ -1,10 +1,9 @@
#import "Common.h"
#import "MWMBaseMapDownloaderViewController.h"
#import "MWMMapDownloaderCountryTableViewCell.h"
#import "MWMMapDownloaderTableViewCell.h"
#import "MWMMapDownloaderLargeCountryTableViewCell.h"
#import "MWMMapDownloaderPlaceTableViewCell.h"
#import "MWMMapDownloaderSubplaceTableViewCell.h"
#import "MWMMapDownloaderTableViewHeader.h"
#import "MWMSegue.h"
#import "UIColor+MapsMeColor.h"
@ -12,7 +11,7 @@
namespace
{
NSString * const kCountryCellIdentifier = @"MWMMapDownloaderCountryTableViewCell";
NSString * const kCellIdentifier = @"MWMMapDownloaderTableViewCell";
NSString * const kLargeCountryCellIdentifier = @"MWMMapDownloaderLargeCountryTableViewCell";
NSString * const kSubplaceCellIdentifier = @"MWMMapDownloaderSubplaceTableViewCell";
NSString * const kPlaceCellIdentifier = @"MWMMapDownloaderPlaceTableViewCell";
@ -86,13 +85,13 @@ using namespace storage;
navBar.shadowImage = self.navBarShadow;
}
#pragma mark - Data
- (void)configNavBar
{
self.title = self.isParentRoot ? L(@"download_maps") : L(@([self GetRootCountryId].c_str()));
}
#pragma mark - Data
- (void)configData
{
auto const & s = GetFramework().Storage();
@ -151,9 +150,10 @@ using namespace storage;
- (void)configTable
{
self.tableView.separatorColor = [UIColor blackDividers];
self.offscreenCells = [NSMutableDictionary dictionary];
[self registerCellWithIdentifier:kPlaceCellIdentifier];
[self registerCellWithIdentifier:kCountryCellIdentifier];
[self registerCellWithIdentifier:kCellIdentifier];
[self registerCellWithIdentifier:kLargeCountryCellIdentifier];
[self registerCellWithIdentifier:kSubplaceCellIdentifier];
}
@ -166,7 +166,7 @@ using namespace storage;
BOOL const haveChildren = !children.empty();
if (haveChildren)
return kLargeCountryCellIdentifier;
return self.isParentRoot ? kCountryCellIdentifier : kPlaceCellIdentifier;
return self.isParentRoot ? kCellIdentifier : kPlaceCellIdentifier;
}
- (void)showActionSheetForRowAtIndexPath:(NSIndexPath *)indexPath
@ -319,15 +319,13 @@ using namespace storage;
#pragma mark - Fill cells with data
- (void)fillCell:(MWMMapDownloaderTableViewCell * _Nonnull)cell atIndexPath:(NSIndexPath * _Nonnull)indexPath
- (void)fillCell:(MWMMapDownloaderTableViewCell *)cell forCountryId:(TCountryId const &)countryId
{
auto const & s = GetFramework().Storage();
NodeAttrs nodeAttrs;
TCountryId countryId = [self countryIdForIndexPath:indexPath];
s.GetNodeAttrs(countryId, nodeAttrs);
[cell setTitleText:@(nodeAttrs.m_nodeLocalName.c_str())];
[cell setDownloadSizeText:formattedSize(nodeAttrs.m_mwmSize)];
[cell setLastCell:[self isLastRowForIndexPath:indexPath]];
if ([cell isKindOfClass:[MWMMapDownloaderLargeCountryTableViewCell class]])
{
@ -381,26 +379,13 @@ using namespace storage;
return index;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return self.isParentRoot ? self.indexes[section] : nil;
}
#pragma mark - UITableViewDelegate
- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForHeaderInSection:(NSInteger)section
{
if (!self.isParentRoot)
return nil;
MWMMapDownloaderTableViewHeader * headerView =
[[[NSBundle mainBundle] loadNibNamed:@"MWMMapDownloaderTableViewHeader"
owner:nil
options:nil] firstObject];
headerView.lastSection = (section == tableView.numberOfSections - 1);
headerView.title.text = self.indexes[section];
return headerView;
}
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section
{
return self.isParentRoot ? [MWMMapDownloaderTableViewHeader height] : 0.0;
}
- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
@ -421,14 +406,15 @@ using namespace storage;
{
NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath];
MWMMapDownloaderTableViewCell * cell = [self offscreenCellForIdentifier:reuseIdentifier];
[self fillCell:cell atIndexPath:indexPath];
TCountryId countryId = [self countryIdForIndexPath:indexPath];
[self fillCell:cell forCountryId:countryId];
[cell setNeedsUpdateConstraints];
[cell updateConstraintsIfNeeded];
cell.bounds = {{}, {CGRectGetWidth(tableView.bounds), CGRectGetHeight(cell.bounds)}};
[cell setNeedsLayout];
[cell layoutIfNeeded];
CGSize const size = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];
return size.height;
return ceil(size.height + 0.5);
}
- (CGFloat)tableView:(UITableView * _Nonnull)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
@ -440,7 +426,7 @@ using namespace storage;
- (void)tableView:(UITableView * _Nonnull)tableView willDisplayCell:(MWMMapDownloaderTableViewCell * _Nonnull)cell forRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
{
[self fillCell:cell atIndexPath:indexPath];
[self fillCell:cell forCountryId:[self countryIdForIndexPath:indexPath]];
}
#pragma mark - UIActionSheetDelegate

View file

@ -1,5 +0,0 @@
#import "MWMMapDownloaderTableViewCell.h"
@interface MWMMapDownloaderCountryTableViewCell : MWMMapDownloaderTableViewCell
@end

View file

@ -1,37 +0,0 @@
#import "MWMMapDownloaderCountryTableViewCell.h"
@interface MWMMapDownloaderTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (weak, nonatomic) IBOutlet UILabel * downloadSize;
@end
@interface MWMMapDownloaderCountryTableViewCell ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleLeadingOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleSizeOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * downloadSizeTrailingOffset;
@end
@implementation MWMMapDownloaderCountryTableViewCell
- (void)layoutSubviews
{
CGFloat const preferredMaxLayoutWidth =
CGRectGetWidth(self.bounds) - self.titleLeadingOffset.constant -
self.titleSizeOffset.constant - CGRectGetWidth(self.downloadSize.bounds) -
self.downloadSizeTrailingOffset.constant;
self.title.preferredMaxLayoutWidth = nearbyint(preferredMaxLayoutWidth);
[super layoutSubviews];
}
#pragma mark - Properties
- (CGFloat)estimatedHeight
{
return 52.0;
}
@end

View file

@ -1,32 +1,17 @@
#import "MWMMapDownloaderLargeCountryTableViewCell.h"
@interface MWMMapDownloaderTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (weak, nonatomic) IBOutlet UILabel * downloadSize;
@end
@interface MWMMapDownloaderLargeCountryTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * mapsCount;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleLeadingOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleSizeOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * downloadSizeTrailingOffset;
@end
@implementation MWMMapDownloaderLargeCountryTableViewCell
- (void)layoutSubviews
{
CGFloat const preferredMaxLayoutWidth =
CGRectGetWidth(self.bounds) - self.titleLeadingOffset.constant -
self.titleSizeOffset.constant - CGRectGetWidth(self.downloadSize.bounds) -
self.downloadSizeTrailingOffset.constant;
self.title.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
self.mapsCount.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
[super layoutSubviews];
self.mapsCount.preferredMaxLayoutWidth = self.mapsCount.width;
[super layoutSubviews];
}

View file

@ -22,7 +22,7 @@
<constraint firstAttribute="width" constant="36" id="WtB-IW-uuH"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="People's Republic of China" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="452" translatesAutoresizingMaskIntoConstraints="NO" id="cum-4j-JlQ">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="People's Republic of China" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="171" translatesAutoresizingMaskIntoConstraints="NO" id="cum-4j-JlQ">
<rect key="frame" x="60" y="12" width="171" height="20"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
@ -32,8 +32,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="14 maps" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="428" translatesAutoresizingMaskIntoConstraints="NO" id="851-fC-gEN">
<rect key="frame" x="60" y="36" width="172" height="14"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="14 maps" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="171" translatesAutoresizingMaskIntoConstraints="NO" id="851-fC-gEN">
<rect key="frame" x="60" y="36" width="171" height="14"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -42,8 +42,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="405 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="60" translatesAutoresizingMaskIntoConstraints="NO" id="9Ni-mb-fA5">
<rect key="frame" x="235" y="23" width="49" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="405 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="49" translatesAutoresizingMaskIntoConstraints="NO" id="9Ni-mb-fA5">
<rect key="frame" x="234" y="23" width="49" height="17"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -62,24 +62,11 @@
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMGray"/>
</userDefinedRuntimeAttributes>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PDd-h3-T3H" userLabel="Separator">
<rect key="frame" x="60" y="61" width="260" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="r9R-Mg-a13"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="PDd-h3-T3H" firstAttribute="leading" secondItem="cum-4j-JlQ" secondAttribute="leading" id="0qs-Oj-qMt"/>
<constraint firstItem="cum-4j-JlQ" firstAttribute="leading" secondItem="rFT-0r-5zy" secondAttribute="leading" constant="60" id="6W7-tW-rcf"/>
<constraint firstAttribute="trailing" secondItem="PDd-h3-T3H" secondAttribute="trailing" id="AhB-T2-BQG"/>
<constraint firstAttribute="trailing" secondItem="9Ni-mb-fA5" secondAttribute="trailing" constant="36" id="C7I-fY-Gfw"/>
<constraint firstAttribute="trailing" secondItem="7HN-EK-QXO" secondAttribute="trailing" constant="8" id="EZJ-3g-VZ0"/>
<constraint firstAttribute="bottom" secondItem="PDd-h3-T3H" secondAttribute="bottom" id="EdR-aB-CpX"/>
<constraint firstItem="3NQ-tT-U9b" firstAttribute="leading" secondItem="rFT-0r-5zy" secondAttribute="leading" constant="12" id="Km2-Bp-fFb"/>
<constraint firstItem="851-fC-gEN" firstAttribute="leading" secondItem="cum-4j-JlQ" secondAttribute="leading" id="NHY-P5-axf"/>
<constraint firstItem="cum-4j-JlQ" firstAttribute="top" secondItem="rFT-0r-5zy" secondAttribute="top" constant="12" id="SEx-Ax-stg"/>
@ -92,15 +79,12 @@
<constraint firstItem="3NQ-tT-U9b" firstAttribute="centerY" secondItem="rFT-0r-5zy" secondAttribute="centerY" id="zd3-Ex-VJY"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="downloadSize" destination="9Ni-mb-fA5" id="PZc-Y9-r5f"/>
<outlet property="downloadSizeTrailingOffset" destination="C7I-fY-Gfw" id="oyQ-zT-0aG"/>
<outlet property="mapsCount" destination="851-fC-gEN" id="xhc-zO-2AU"/>
<outlet property="separator" destination="PDd-h3-T3H" id="QrT-DH-LYt"/>
<outlet property="stateWrapper" destination="3NQ-tT-U9b" id="y81-vb-Txw"/>
<outlet property="title" destination="cum-4j-JlQ" id="O2m-lR-MDt"/>
<outlet property="titleLeadingOffset" destination="6W7-tW-rcf" id="w5I-tt-cOu"/>
<outlet property="titleSizeOffset" destination="hV0-8P-jwr" id="qIP-i9-NT2"/>
<outlet property="downloadSize" destination="9Ni-mb-fA5" id="btQ-8t-pIV"/>
<outlet property="mapsCount" destination="851-fC-gEN" id="dY0-zX-KS2"/>
<outlet property="stateWrapper" destination="3NQ-tT-U9b" id="PJw-9U-8b3"/>
<outlet property="title" destination="cum-4j-JlQ" id="f9c-KC-2dR"/>
</connections>
<point key="canvasLocation" x="282" y="403"/>
</tableViewCell>

View file

@ -1,19 +1,9 @@
#import "MWMMapDownloaderPlaceTableViewCell.h"
@interface MWMMapDownloaderTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (weak, nonatomic) IBOutlet UILabel * downloadSize;
@end
@interface MWMMapDownloaderPlaceTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * area;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleBottomOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleLeadingOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleSizeOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * downloadSizeTrailingOffset;
@end
@ -21,12 +11,8 @@
- (void)layoutSubviews
{
CGFloat const preferredMaxLayoutWidth =
CGRectGetWidth(self.bounds) - self.titleLeadingOffset.constant -
self.titleSizeOffset.constant - CGRectGetWidth(self.downloadSize.bounds) -
self.downloadSizeTrailingOffset.constant;
self.title.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
self.area.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
[super layoutSubviews];
self.area.preferredMaxLayoutWidth = self.area.width;
[super layoutSubviews];
}

View file

@ -11,7 +11,7 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="62"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1KI-85-wsU" id="mRF-11-OKU">
<rect key="frame" x="0.0" y="0.0" width="320" height="62"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="61"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Yb5-r1-Z2X">
@ -22,7 +22,7 @@
<constraint firstAttribute="width" constant="36" id="vYF-tP-Wtw"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="London" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="180" translatesAutoresizingMaskIntoConstraints="NO" id="3Db-Yq-FlD">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="London" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="199" translatesAutoresizingMaskIntoConstraints="NO" id="3Db-Yq-FlD">
<rect key="frame" x="60" y="12" width="199" height="20"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
@ -32,7 +32,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UK" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="180" translatesAutoresizingMaskIntoConstraints="NO" id="fev-4l-MY3">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UK" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="199" translatesAutoresizingMaskIntoConstraints="NO" id="fev-4l-MY3">
<rect key="frame" x="60" y="36" width="199" height="14"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
@ -42,8 +42,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="45 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="60" translatesAutoresizingMaskIntoConstraints="NO" id="rqh-iy-Sx9">
<rect key="frame" x="263" y="23" width="41" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="45 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="41" translatesAutoresizingMaskIntoConstraints="NO" id="rqh-iy-Sx9">
<rect key="frame" x="263" y="23" width="41" height="17"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -52,25 +52,12 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ncN-br-N9Y" userLabel="Separator">
<rect key="frame" x="60" y="61" width="260" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Oen-mP-flU"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="3Db-Yq-FlD" firstAttribute="leading" secondItem="mRF-11-OKU" secondAttribute="leading" constant="60" id="2CW-BR-iT1"/>
<constraint firstItem="ncN-br-N9Y" firstAttribute="leading" secondItem="3Db-Yq-FlD" secondAttribute="leading" id="2c6-d4-P8T"/>
<constraint firstItem="Yb5-r1-Z2X" firstAttribute="leading" secondItem="mRF-11-OKU" secondAttribute="leading" constant="12" id="GGp-H1-htH"/>
<constraint firstItem="3Db-Yq-FlD" firstAttribute="top" secondItem="mRF-11-OKU" secondAttribute="top" constant="12" id="Jhy-gy-RcP"/>
<constraint firstItem="rqh-iy-Sx9" firstAttribute="leading" secondItem="3Db-Yq-FlD" secondAttribute="trailing" constant="4" id="NhL-qc-Mcu"/>
<constraint firstAttribute="bottom" secondItem="ncN-br-N9Y" secondAttribute="bottom" id="Wsy-j3-UTP"/>
<constraint firstAttribute="trailing" secondItem="ncN-br-N9Y" secondAttribute="trailing" id="Ye2-gP-1ci"/>
<constraint firstAttribute="trailing" secondItem="rqh-iy-Sx9" secondAttribute="trailing" constant="16" id="dil-Rw-64e"/>
<constraint firstItem="fev-4l-MY3" firstAttribute="top" secondItem="3Db-Yq-FlD" secondAttribute="bottom" priority="500" constant="4" id="ePz-Xy-IoM"/>
<constraint firstAttribute="bottom" secondItem="3Db-Yq-FlD" secondAttribute="bottom" priority="250" constant="12" id="ffv-VG-1xY"/>
@ -81,16 +68,13 @@
<constraint firstItem="rqh-iy-Sx9" firstAttribute="leading" secondItem="fev-4l-MY3" secondAttribute="trailing" constant="4" id="rqB-DG-k9N"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="area" destination="fev-4l-MY3" id="JQg-RJ-YjR"/>
<outlet property="downloadSize" destination="rqh-iy-Sx9" id="iEN-WT-NXv"/>
<outlet property="downloadSizeTrailingOffset" destination="dil-Rw-64e" id="sfH-cS-c93"/>
<outlet property="separator" destination="ncN-br-N9Y" id="H0z-Eg-8zn"/>
<outlet property="stateWrapper" destination="Yb5-r1-Z2X" id="4BR-Rb-3iF"/>
<outlet property="title" destination="3Db-Yq-FlD" id="jG8-xD-51V"/>
<outlet property="titleBottomOffset" destination="ffv-VG-1xY" id="i4r-Nh-hWQ"/>
<outlet property="titleLeadingOffset" destination="2CW-BR-iT1" id="FxC-Er-pcN"/>
<outlet property="titleSizeOffset" destination="NhL-qc-Mcu" id="0ZG-R3-48N"/>
<outlet property="area" destination="fev-4l-MY3" id="6xU-Oo-rem"/>
<outlet property="downloadSize" destination="rqh-iy-Sx9" id="g9R-G7-dxQ"/>
<outlet property="stateWrapper" destination="Yb5-r1-Z2X" id="iPW-N5-qJi"/>
<outlet property="title" destination="3Db-Yq-FlD" id="qtt-YF-a0V"/>
<outlet property="titleBottomOffset" destination="ffv-VG-1xY" id="bji-kf-Rgd"/>
</connections>
<point key="canvasLocation" x="282" y="403"/>
</tableViewCell>

View file

@ -1,8 +1,5 @@
#import "MWMMapDownloaderTableViewCell.h"
#import "MWMMapDownloaderPlaceTableViewCell.h"
@interface MWMMapDownloaderSubplaceTableViewCell : MWMMapDownloaderTableViewCell
@property (weak, nonatomic) IBOutlet UILabel * area;
@property (weak, nonatomic) IBOutlet UILabel * subPlace;
@interface MWMMapDownloaderSubplaceTableViewCell : MWMMapDownloaderPlaceTableViewCell
@end

View file

@ -1,17 +1,8 @@
#import "MWMMapDownloaderSubplaceTableViewCell.h"
@interface MWMMapDownloaderTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (weak, nonatomic) IBOutlet UILabel * downloadSize;
@end
@interface MWMMapDownloaderSubplaceTableViewCell ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleLeadingOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleSizeOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * downloadSizeTrailingOffset;
@property (weak, nonatomic) IBOutlet UILabel * subPlace;
@end
@ -19,14 +10,14 @@
- (void)layoutSubviews
{
CGFloat const preferredMaxLayoutWidth =
CGRectGetWidth(self.bounds) - self.titleLeadingOffset.constant -
self.titleSizeOffset.constant - CGRectGetWidth(self.downloadSize.bounds) -
self.downloadSizeTrailingOffset.constant;
self.title.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
self.area.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
self.subPlace.preferredMaxLayoutWidth = preferredMaxLayoutWidth;
[super layoutSubviews];
self.subPlace.preferredMaxLayoutWidth = self.subPlace.width;
[super layoutSubviews];
}
- (void)setSubplaceText:(NSString *)text
{
self.subPlace.text = text;
}
#pragma mark - Properties

View file

@ -22,8 +22,8 @@
<constraint firstAttribute="width" constant="36" id="vYF-tP-Wtw"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="760" text="Mossel Bay" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="180" translatesAutoresizingMaskIntoConstraints="NO" id="x7m-Zm-8y6">
<rect key="frame" x="60" y="12" width="199" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="760" text="Mossel Bay" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="198" translatesAutoresizingMaskIntoConstraints="NO" id="x7m-Zm-8y6">
<rect key="frame" x="60" y="12" width="198" height="16"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -32,8 +32,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="760" text="London" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="180" translatesAutoresizingMaskIntoConstraints="NO" id="3Db-Yq-FlD">
<rect key="frame" x="60" y="32" width="199" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="760" text="London" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="198" translatesAutoresizingMaskIntoConstraints="NO" id="3Db-Yq-FlD">
<rect key="frame" x="60" y="32" width="198" height="20"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -42,8 +42,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UK" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="180" translatesAutoresizingMaskIntoConstraints="NO" id="fev-4l-MY3">
<rect key="frame" x="60" y="56" width="199" height="13"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UK" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="198" translatesAutoresizingMaskIntoConstraints="NO" id="fev-4l-MY3">
<rect key="frame" x="60" y="56" width="198" height="14"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -52,8 +52,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="45 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="60" translatesAutoresizingMaskIntoConstraints="NO" id="rqh-iy-Sx9">
<rect key="frame" x="262" y="33" width="42" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="45 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="41" translatesAutoresizingMaskIntoConstraints="NO" id="rqh-iy-Sx9">
<rect key="frame" x="262" y="33" width="41" height="16"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -62,30 +62,16 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ncN-br-N9Y" userLabel="Separator">
<rect key="frame" x="60" y="81" width="260" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Oen-mP-flU"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="3Db-Yq-FlD" firstAttribute="leading" secondItem="mRF-11-OKU" secondAttribute="leading" constant="60" id="4Sj-Yh-d4y"/>
<constraint firstItem="ncN-br-N9Y" firstAttribute="top" secondItem="fev-4l-MY3" secondAttribute="bottom" constant="12" id="AC9-aZ-n7D"/>
<constraint firstItem="3Db-Yq-FlD" firstAttribute="top" secondItem="x7m-Zm-8y6" secondAttribute="bottom" constant="4" id="AFW-TD-ADw"/>
<constraint firstItem="x7m-Zm-8y6" firstAttribute="top" secondItem="mRF-11-OKU" secondAttribute="top" constant="12" id="E4o-jw-VEZ"/>
<constraint firstItem="Yb5-r1-Z2X" firstAttribute="leading" secondItem="mRF-11-OKU" secondAttribute="leading" constant="12" id="GGp-H1-htH"/>
<constraint firstItem="rqh-iy-Sx9" firstAttribute="leading" secondItem="x7m-Zm-8y6" secondAttribute="trailing" constant="4" id="GsC-fa-5kk"/>
<constraint firstItem="rqh-iy-Sx9" firstAttribute="leading" secondItem="3Db-Yq-FlD" secondAttribute="trailing" constant="4" id="I7Q-yY-JMS"/>
<constraint firstAttribute="bottom" secondItem="ncN-br-N9Y" secondAttribute="bottom" id="Wsy-j3-UTP"/>
<constraint firstAttribute="trailing" secondItem="ncN-br-N9Y" secondAttribute="trailing" id="Ye2-gP-1ci"/>
<constraint firstItem="fev-4l-MY3" firstAttribute="leading" secondItem="3Db-Yq-FlD" secondAttribute="leading" id="Yk6-jH-hKS"/>
<constraint firstAttribute="trailing" secondItem="rqh-iy-Sx9" secondAttribute="trailing" constant="16" id="dil-Rw-64e"/>
<constraint firstItem="ncN-br-N9Y" firstAttribute="leading" secondItem="3Db-Yq-FlD" secondAttribute="leading" id="eMb-9Q-1zY"/>
<constraint firstItem="Yb5-r1-Z2X" firstAttribute="centerY" secondItem="mRF-11-OKU" secondAttribute="centerY" id="g72-Dp-9Ky"/>
<constraint firstItem="rqh-iy-Sx9" firstAttribute="leading" secondItem="fev-4l-MY3" secondAttribute="trailing" constant="4" id="oqd-UU-h0T"/>
<constraint firstItem="fev-4l-MY3" firstAttribute="top" secondItem="3Db-Yq-FlD" secondAttribute="bottom" constant="4" id="pwP-cL-stJ"/>
@ -93,16 +79,13 @@
<constraint firstItem="rqh-iy-Sx9" firstAttribute="centerY" secondItem="mRF-11-OKU" secondAttribute="centerY" id="qZa-yl-a6W"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="area" destination="fev-4l-MY3" id="JQg-RJ-YjR"/>
<outlet property="downloadSize" destination="rqh-iy-Sx9" id="iEN-WT-NXv"/>
<outlet property="downloadSizeTrailingOffset" destination="dil-Rw-64e" id="MLH-Dw-Q9M"/>
<outlet property="separator" destination="ncN-br-N9Y" id="H0z-Eg-8zn"/>
<outlet property="stateWrapper" destination="Yb5-r1-Z2X" id="4BR-Rb-3iF"/>
<outlet property="subPlace" destination="x7m-Zm-8y6" id="tgY-04-gfe"/>
<outlet property="title" destination="3Db-Yq-FlD" id="jG8-xD-51V"/>
<outlet property="titleLeadingOffset" destination="4Sj-Yh-d4y" id="5QR-E0-ROS"/>
<outlet property="titleSizeOffset" destination="I7Q-yY-JMS" id="InJ-7Q-cWM"/>
<outlet property="area" destination="fev-4l-MY3" id="3BY-9T-0E9"/>
<outlet property="downloadSize" destination="rqh-iy-Sx9" id="q4T-Pv-DrI"/>
<outlet property="stateWrapper" destination="Yb5-r1-Z2X" id="eb8-Ut-gh5"/>
<outlet property="subPlace" destination="x7m-Zm-8y6" id="63W-Bc-FdX"/>
<outlet property="title" destination="3Db-Yq-FlD" id="JdN-yn-xLw"/>
</connections>
<point key="canvasLocation" x="282" y="403"/>
</tableViewCell>

View file

@ -6,6 +6,5 @@
- (void)setTitleText:(NSString *)text;
- (void)setDownloadSizeText:(NSString *)text;
- (void)setLastCell:(BOOL)isLast;
@end

View file

@ -7,7 +7,6 @@
@property (weak, nonatomic) IBOutlet UIView * stateWrapper;
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (weak, nonatomic) IBOutlet UILabel * downloadSize;
@property (weak, nonatomic) IBOutlet UIView * separator;
@end
@ -27,9 +26,12 @@
[self.progressView setImage:[UIImage imageNamed:@"ic_check"] forState:MWMCircularProgressStateCompleted];
}
- (CGFloat)estimatedHeight
- (void)layoutSubviews
{
return 52.0;
[super layoutSubviews];
self.title.preferredMaxLayoutWidth = self.title.width;
self.downloadSize.preferredMaxLayoutWidth = self.downloadSize.width;
[super layoutSubviews];
}
- (void)setTitleText:(NSString *)text
@ -42,24 +44,6 @@
self.downloadSize.text = text;
}
- (void)setLastCell:(BOOL)isLast
{
self.separator.hidden = isLast;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
UIColor * color = self.separator.backgroundColor;
[super setSelected:selected animated:animated];
self.separator.backgroundColor = color;
}
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
UIColor * color = self.separator.backgroundColor;
[super setHighlighted:highlighted animated:animated];
self.separator.backgroundColor = color;
}
#pragma mark - MWMCircularProgressDelegate
- (void)progressButtonPressed:(nonnull MWMCircularProgress *)progress
@ -67,4 +51,11 @@
}
#pragma mark - Properties
- (CGFloat)estimatedHeight
{
return 52.0;
}
@end

View file

@ -7,11 +7,11 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MWMMapDownloaderCountryTableViewCell" rowHeight="52" id="Igh-sI-4cU" customClass="MWMMapDownloaderCountryTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="600" height="52"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MWMMapDownloaderTableViewCell" rowHeight="52" id="Igh-sI-4cU" customClass="MWMMapDownloaderTableViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="52"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Igh-sI-4cU" id="hYr-eg-wbg">
<rect key="frame" x="0.0" y="0.0" width="600" height="51"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rTN-aw-5k7">
@ -22,8 +22,8 @@
<constraint firstAttribute="height" constant="36" id="aA3-Ok-RSD"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Algeria" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="467" translatesAutoresizingMaskIntoConstraints="NO" id="5kc-K7-7K8">
<rect key="frame" x="60" y="16" width="466" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="249" horizontalCompressionResistancePriority="752" verticalCompressionResistancePriority="752" text="Algeria" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="186" translatesAutoresizingMaskIntoConstraints="NO" id="5kc-K7-7K8">
<rect key="frame" x="60" y="16" width="186" height="20"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -32,8 +32,8 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="30 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="41" translatesAutoresizingMaskIntoConstraints="NO" id="lgA-X0-501">
<rect key="frame" x="542" y="18" width="41" height="16"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="30 MB" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="42" translatesAutoresizingMaskIntoConstraints="NO" id="lgA-X0-501">
<rect key="frame" x="262" y="17" width="42" height="17"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
@ -42,41 +42,25 @@
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wAY-zI-IKA" userLabel="Separator">
<rect key="frame" x="60" y="51" width="540" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="8dG-WK-cuW"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="lgA-X0-501" firstAttribute="centerY" secondItem="hYr-eg-wbg" secondAttribute="centerY" id="5QG-IM-adn"/>
<constraint firstItem="5kc-K7-7K8" firstAttribute="leading" secondItem="hYr-eg-wbg" secondAttribute="leading" constant="60" id="6Dv-Pw-tTy"/>
<constraint firstAttribute="trailing" secondItem="lgA-X0-501" secondAttribute="trailing" constant="16" id="Af9-0B-Y6q"/>
<constraint firstItem="wAY-zI-IKA" firstAttribute="leading" secondItem="5kc-K7-7K8" secondAttribute="leading" id="Alq-ia-ppm"/>
<constraint firstItem="rTN-aw-5k7" firstAttribute="leading" secondItem="hYr-eg-wbg" secondAttribute="leading" constant="12" id="Jfc-5q-LZI"/>
<constraint firstAttribute="bottom" secondItem="wAY-zI-IKA" secondAttribute="bottom" id="O5X-ir-xc2"/>
<constraint firstAttribute="bottom" secondItem="5kc-K7-7K8" secondAttribute="bottom" constant="16" id="ZLY-Tp-hnL"/>
<constraint firstItem="lgA-X0-501" firstAttribute="leading" secondItem="5kc-K7-7K8" secondAttribute="trailing" constant="16" id="Zwe-tB-xNb"/>
<constraint firstItem="5kc-K7-7K8" firstAttribute="top" secondItem="hYr-eg-wbg" secondAttribute="top" constant="16" id="anV-3S-XAR"/>
<constraint firstAttribute="trailing" secondItem="wAY-zI-IKA" secondAttribute="trailing" id="oFp-tD-lQg"/>
<constraint firstItem="rTN-aw-5k7" firstAttribute="centerY" secondItem="hYr-eg-wbg" secondAttribute="centerY" id="tND-fx-OhO"/>
</constraints>
</tableViewCellContentView>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="downloadSize" destination="lgA-X0-501" id="1Hz-cl-E29"/>
<outlet property="downloadSizeTrailingOffset" destination="Af9-0B-Y6q" id="OB0-mk-QBg"/>
<outlet property="separator" destination="wAY-zI-IKA" id="bIO-Ht-cnQ"/>
<outlet property="stateWrapper" destination="rTN-aw-5k7" id="MVz-RD-Tpp"/>
<outlet property="title" destination="5kc-K7-7K8" id="WSX-fJ-3kK"/>
<outlet property="titleLeadingOffset" destination="6Dv-Pw-tTy" id="Bd3-L2-Sgw"/>
<outlet property="titleSizeOffset" destination="Zwe-tB-xNb" id="s6k-fw-UYa"/>
<outlet property="downloadSize" destination="lgA-X0-501" id="Dl4-r1-7lU"/>
<outlet property="stateWrapper" destination="rTN-aw-5k7" id="3jJ-Zp-S0C"/>
<outlet property="title" destination="5kc-K7-7K8" id="SDA-Yd-DD2"/>
</connections>
<point key="canvasLocation" x="285" y="375"/>
<point key="canvasLocation" x="285" y="406"/>
</tableViewCell>
</objects>
</document>

View file

@ -1,11 +0,0 @@
@class MWMMapDownloaderTableViewHeader;
@interface MWMMapDownloaderTableViewHeader : UIView
+ (CGFloat)height;
@property (weak, nonatomic) IBOutlet UILabel * title;
@property (nonatomic) BOOL lastSection;
@end

View file

@ -1,17 +0,0 @@
#import "Common.h"
#import "MWMMapDownloaderTableViewHeader.h"
@interface MWMMapDownloaderTableViewHeader ()
@property (weak, nonatomic) IBOutlet UIView * separatorDown;
@end
@implementation MWMMapDownloaderTableViewHeader
+ (CGFloat)height
{
return 28.0;
}
@end

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="b49-gZ-yx0" customClass="MWMMapDownloaderTableViewHeader">
<rect key="frame" x="0.0" y="0.0" width="375" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PMw-UJ-6y5" userLabel="SeparatorUp">
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="FH1-BN-bpf"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Near Me" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="315" translatesAutoresizingMaskIntoConstraints="NO" id="1oa-vX-tyu">
<rect key="frame" x="16" y="7" width="49" height="15"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3BJ-0r-JzZ" userLabel="SeparatorDown">
<rect key="frame" x="0.0" y="27" width="375" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="L1j-JT-Ndn"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="3BJ-0r-JzZ" secondAttribute="trailing" id="3LM-mW-2ZP"/>
<constraint firstItem="3BJ-0r-JzZ" firstAttribute="leading" secondItem="b49-gZ-yx0" secondAttribute="leading" id="9ho-C1-Gtc"/>
<constraint firstItem="PMw-UJ-6y5" firstAttribute="leading" secondItem="b49-gZ-yx0" secondAttribute="leading" id="E6R-dv-UcP"/>
<constraint firstAttribute="trailing" secondItem="PMw-UJ-6y5" secondAttribute="trailing" id="LbV-hu-3hY"/>
<constraint firstItem="1oa-vX-tyu" firstAttribute="leading" secondItem="b49-gZ-yx0" secondAttribute="leading" priority="750" constant="16" id="e0S-e8-4Db"/>
<constraint firstItem="1oa-vX-tyu" firstAttribute="centerY" secondItem="b49-gZ-yx0" secondAttribute="centerY" id="o6C-03-A3I"/>
<constraint firstAttribute="bottom" secondItem="3BJ-0r-JzZ" secondAttribute="bottom" id="uii-fZ-QtZ"/>
<constraint firstItem="PMw-UJ-6y5" firstAttribute="top" secondItem="b49-gZ-yx0" secondAttribute="top" id="x6d-eE-mk8"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="separatorDown" destination="3BJ-0r-JzZ" id="gIO-RV-OmV"/>
<outlet property="title" destination="1oa-vX-tyu" id="aPF-QZ-120"/>
</connections>
<point key="canvasLocation" x="179" y="357"/>
</view>
</objects>
</document>

View file

@ -1,12 +1,22 @@
#import "Common.h"
#import "LocationManager.h"
#import "MapsAppDelegate.h"
#import "MWMMapDownloaderViewController.h"
#import "UIColor+MapsMeColor.h"
#import "UIKitCategories.h"
#include "Framework.h"
using namespace storage;
@interface MWMBaseMapDownloaderViewController ()
@property (weak, nonatomic) IBOutlet UITableView * tableView;
- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath;
- (void)fillCell:(MWMMapDownloaderTableViewCell * _Nonnull)cell atIndexPath:(NSIndexPath * _Nonnull)indexPath;
- (void)fillCell:(MWMMapDownloaderTableViewCell *)cell forCountryId:(TCountryId const &)countryId;
- (void)configData;
- (TCountryId)countryIdForIndexPath:(NSIndexPath *)indexPath;
@end
@ -14,7 +24,12 @@
@property (weak, nonatomic) IBOutlet UIView * statusBarBackground;
@property (weak, nonatomic) IBOutlet UISearchBar * searchBar;
@property (weak, nonatomic) IBOutlet UITableView * tableView;
@property (nonatomic) NSArray<NSString *> * closestCoutryIds;
@property (nonatomic) NSArray<NSString *> * downloadedCoutryIds;
@property (nonatomic) NSInteger baseSectionShift;
@property (nonatomic) NSInteger closestCountriesSection;
@property (nonatomic) NSInteger downloadedCountriesSection;
@end
@ -34,6 +49,59 @@
self.searchBar.backgroundImage = [UIImage imageWithColor:searchBarColor];
}
#pragma mark - Data
- (void)configData
{
[super configData];
self.baseSectionShift = 0;
[self configNearMe];
[self configDownloaded];
}
- (void)configNearMe
{
LocationManager * lm = MapsAppDelegate.theApp.m_locationManager;
if (!lm.lastLocationIsValid)
return;
auto & countryInfoGetter = GetFramework().CountryInfoGetter();
TCountriesVec closestCoutryIds;
countryInfoGetter.GetRegionsCountryId(lm.lastLocation.mercator, closestCoutryIds);
NSMutableArray<NSString *> * nsClosestCoutryIds = [@[] mutableCopy];
for (auto const & countryId : closestCoutryIds)
[nsClosestCoutryIds addObject:@(countryId.c_str())];
self.closestCoutryIds = [nsClosestCoutryIds copy];
if (self.closestCoutryIds.count != 0)
self.closestCountriesSection = self.baseSectionShift++;
}
- (void)configDownloaded
{
auto const & s = GetFramework().Storage();
TCountriesVec downloadedCoutryIds;
s.GetDownloadedChildren([self GetRootCountryId], downloadedCoutryIds);
NSMutableArray<NSString *> * nsDownloadedCoutryIds = [@[] mutableCopy];
for (auto const & countryId : downloadedCoutryIds)
[nsDownloadedCoutryIds addObject:@(countryId.c_str())];
self.downloadedCoutryIds = [nsDownloadedCoutryIds copy];
if (self.downloadedCoutryIds.count != 0)
self.downloadedCountriesSection = self.baseSectionShift++;
}
- (TCountryId)countryIdForIndexPath:(NSIndexPath *)indexPath
{
NSInteger const section = indexPath.section;
NSInteger const row = indexPath.row;
if (section >= self.baseSectionShift)
return [super countryIdForIndexPath:[NSIndexPath indexPathForRow:row inSection:section - self.baseSectionShift]];
if (section == self.closestCountriesSection)
return self.closestCoutryIds[row].UTF8String;
if (section == self.downloadedCountriesSection)
return self.downloadedCoutryIds[row].UTF8String;
NSAssert(NO, @"Invalid section");
return kInvalidCountryId;
}
#pragma mark - Table
- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath
@ -51,51 +119,46 @@
self.showAllMapsView = NO;
}
#pragma mark - Fill cells with data
- (void)fillCell:(MWMMapDownloaderTableViewCell * _Nonnull)cell atIndexPath:(NSIndexPath * _Nonnull)indexPath
{
[super fillCell:cell atIndexPath:indexPath];
}
#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView * _Nonnull)tableView
{
// TODO (igrechuhin) Add implementation
return [super numberOfSectionsInTableView:tableView];
NSInteger numberOfSections = [super numberOfSectionsInTableView:tableView];
return numberOfSections + self.baseSectionShift;
}
- (NSInteger)tableView:(UITableView * _Nonnull)tableView numberOfRowsInSection:(NSInteger)section
{
// TODO (igrechuhin) Add implementation
return [super tableView:tableView numberOfRowsInSection:section];
if (section >= self.baseSectionShift)
return [super tableView:tableView numberOfRowsInSection:section - self.baseSectionShift];
if (section == self.closestCountriesSection)
return self.closestCoutryIds.count;
if (section == self.downloadedCountriesSection)
return self.downloadedCoutryIds.count;
NSAssert(NO, @"Invalid section");
return 0;
}
- (NSArray<NSString *> * _Nullable)sectionIndexTitlesForTableView:(UITableView * _Nonnull)tableView
{
// TODO (igrechuhin) Add implementation
return [super sectionIndexTitlesForTableView:tableView];
}
- (NSInteger)tableView:(UITableView * _Nonnull)tableView sectionForSectionIndexTitle:(NSString * _Nonnull)title atIndex:(NSInteger)index
{
// TODO (igrechuhin) Add implementation
return [super tableView:tableView sectionForSectionIndexTitle:title atIndex:index];
return [super tableView:tableView sectionForSectionIndexTitle:title atIndex:index] + self.baseSectionShift;
}
#pragma mark - UITableViewDelegate
- (UIView * _Nullable)tableView:(UITableView * _Nonnull)tableView viewForHeaderInSection:(NSInteger)section
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
// TODO (igrechuhin) Add implementation
return [super tableView:tableView viewForHeaderInSection:section];
}
- (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForHeaderInSection:(NSInteger)section
{
// TODO (igrechuhin) Add implementation
return [super tableView:tableView heightForHeaderInSection:section];
if (section >= self.baseSectionShift)
return [super tableView:tableView titleForHeaderInSection:section - self.baseSectionShift];
if (section == self.closestCountriesSection)
return L(@"search_mode_nearme");
if (section == self.downloadedCountriesSection)
return L(@"downloader_downloaded_maps");
NSAssert(NO, @"Invalid section");
return @"";
}
#pragma mark - UISearchBarDelegate

View file

@ -51,7 +51,8 @@
341C2A571B72092A00AD41A1 /* 02_droidsans-fallback.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9DF04B231B71010E00DACAF1 /* 02_droidsans-fallback.ttf */; };
341C2A5B1B720B8A00AD41A1 /* MWMAPIBarView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 341C2A5A1B720B8A00AD41A1 /* MWMAPIBarView.xib */; };
341F09841C20138100F18AC5 /* libpugixml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 341F09831C20138100F18AC5 /* libpugixml.a */; };
34212C031BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C021BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib */; };
341FAB981C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 341FAB971C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib */; };
341FAB991C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 341FAB971C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib */; };
34212C051BE897A100DB4B18 /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C041BE897A100DB4B18 /* MWMMapDownloaderPlaceTableViewCell.xib */; };
34212C071BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C061BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib */; };
342AD76F1B53D30C00E0B997 /* UIButton+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AD76E1B53D30C00E0B997 /* UIButton+RuntimeAttributes.mm */; };
@ -175,12 +176,9 @@
34ABA6301C2D58F300FE1BEC /* MWMInputEmailValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */; };
34ABA6341C2D64D400FE1BEC /* MWMAuthorizationForgottenPasswordViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6331C2D64D400FE1BEC /* MWMAuthorizationForgottenPasswordViewController.mm */; };
34ABA6351C2D64D400FE1BEC /* MWMAuthorizationForgottenPasswordViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6331C2D64D400FE1BEC /* MWMAuthorizationForgottenPasswordViewController.mm */; };
34AF5FB41BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB31BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm */; };
34AF5FB71BE38F51002AEAEE /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB61BE38F51002AEAEE /* MWMMapDownloaderPlaceTableViewCell.mm */; };
34AF5FBA1BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB91BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.mm */; };
34AF5FBD1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FBC1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.mm */; };
34AF5FC31BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FC21BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm */; };
34AF5FC51BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34AF5FC41BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib */; };
34B16C451B72655D000D3A0D /* MWMPedestrianShareAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B16C441B72655D000D3A0D /* MWMPedestrianShareAlert.mm */; };
34B6CF5D1BBBFC6B009203C6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34B6CF5C1BBBFC6B009203C6 /* LaunchScreen.storyboard */; };
34B82AB21B8344E300180497 /* MWMSearchTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AB11B8344E300180497 /* MWMSearchTextField.mm */; };
@ -242,16 +240,12 @@
34DDD5341BFDB0B600407F2F /* MWMMapDownloaderViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AF0DF1BE24E9A0016F3AE /* MWMMapDownloaderViewController.mm */; };
34DDD5351BFDB0C600407F2F /* MWMBaseMapDownloaderViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341223BA1BEB58FA007227E9 /* MWMBaseMapDownloaderViewController.mm */; };
34DDD5361BFDB0CF00407F2F /* MWMMapDownloaderTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D7B0521BE8E947003C2A60 /* MWMMapDownloaderTableViewCell.mm */; };
34DDD5371BFDB0D300407F2F /* MWMMapDownloaderCountryTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB31BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm */; };
34DDD5381BFDB0DA00407F2F /* MWMMapDownloaderCountryTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C021BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib */; };
34DDD5391BFDB0E100407F2F /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB91BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.mm */; };
34DDD53A1BFDB0E500407F2F /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C061BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib */; };
34DDD53B1BFDB0EC00407F2F /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FB61BE38F51002AEAEE /* MWMMapDownloaderPlaceTableViewCell.mm */; };
34DDD53C1BFDB0EF00407F2F /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34212C041BE897A100DB4B18 /* MWMMapDownloaderPlaceTableViewCell.xib */; };
34DDD53D1BFDB0F500407F2F /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FBC1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.mm */; };
34DDD53E1BFDB0F900407F2F /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 343D18781BE8CE7200FCAFAC /* MWMMapDownloaderSubplaceTableViewCell.xib */; };
34DDD53F1BFDB0FD00407F2F /* MWMMapDownloaderTableViewHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34AF5FC21BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm */; };
34DDD5401BFDB10100407F2F /* MWMMapDownloaderTableViewHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34AF5FC41BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib */; };
34EB84581C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34EB84571C073DF70004689F /* MWMOpeningHoursEditorViewController.mm */; };
34EB84591C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34EB84571C073DF70004689F /* MWMOpeningHoursEditorViewController.mm */; };
34EF94291C05A6F30050B714 /* MWMSegue.mm in Sources */ = {isa = PBXBuildFile; fileRef = F607C18D1C047FDC00B53A87 /* MWMSegue.mm */; };
@ -828,7 +822,7 @@
3419AAA81BDFD0B0003DC110 /* MWMUpdateMapsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMUpdateMapsAlert.xib; sourceTree = "<group>"; };
341C2A5A1B720B8A00AD41A1 /* MWMAPIBarView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAPIBarView.xib; sourceTree = "<group>"; };
341F09831C20138100F18AC5 /* libpugixml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpugixml.a; path = "../../../omim-xcode-build/Debug/libpugixml.a"; sourceTree = "<group>"; };
34212C021BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderCountryTableViewCell.xib; sourceTree = "<group>"; };
341FAB971C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderTableViewCell.xib; sourceTree = "<group>"; };
34212C041BE897A100DB4B18 /* MWMMapDownloaderPlaceTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderPlaceTableViewCell.xib; sourceTree = "<group>"; };
34212C061BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderLargeCountryTableViewCell.xib; sourceTree = "<group>"; };
342AD76D1B53D30C00E0B997 /* UIButton+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RuntimeAttributes.h"; sourceTree = "<group>"; };
@ -986,17 +980,12 @@
34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputEmailValidator.mm; sourceTree = "<group>"; };
34ABA6321C2D64D300FE1BEC /* MWMAuthorizationForgottenPasswordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAuthorizationForgottenPasswordViewController.h; sourceTree = "<group>"; };
34ABA6331C2D64D400FE1BEC /* MWMAuthorizationForgottenPasswordViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAuthorizationForgottenPasswordViewController.mm; sourceTree = "<group>"; };
34AF5FB21BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderCountryTableViewCell.h; sourceTree = "<group>"; };
34AF5FB31BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderCountryTableViewCell.mm; sourceTree = "<group>"; };
34AF5FB51BE38F51002AEAEE /* MWMMapDownloaderPlaceTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderPlaceTableViewCell.h; sourceTree = "<group>"; };
34AF5FB61BE38F51002AEAEE /* MWMMapDownloaderPlaceTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderPlaceTableViewCell.mm; sourceTree = "<group>"; };
34AF5FB81BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderLargeCountryTableViewCell.h; sourceTree = "<group>"; };
34AF5FB91BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderLargeCountryTableViewCell.mm; sourceTree = "<group>"; };
34AF5FBB1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderSubplaceTableViewCell.h; sourceTree = "<group>"; };
34AF5FBC1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderSubplaceTableViewCell.mm; sourceTree = "<group>"; };
34AF5FC11BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderTableViewHeader.h; sourceTree = "<group>"; };
34AF5FC21BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderTableViewHeader.mm; sourceTree = "<group>"; };
34AF5FC41BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderTableViewHeader.xib; sourceTree = "<group>"; };
34B16C431B72655D000D3A0D /* MWMPedestrianShareAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPedestrianShareAlert.h; sourceTree = "<group>"; };
34B16C441B72655D000D3A0D /* MWMPedestrianShareAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPedestrianShareAlert.mm; sourceTree = "<group>"; };
34B6CF5C1BBBFC6B009203C6 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
@ -1768,9 +1757,7 @@
342AF0DF1BE24E9A0016F3AE /* MWMMapDownloaderViewController.mm */,
34D7B0511BE8E947003C2A60 /* MWMMapDownloaderTableViewCell.h */,
34D7B0521BE8E947003C2A60 /* MWMMapDownloaderTableViewCell.mm */,
34AF5FB21BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.h */,
34AF5FB31BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm */,
34212C021BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib */,
341FAB971C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib */,
34AF5FB81BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.h */,
34AF5FB91BE39473002AEAEE /* MWMMapDownloaderLargeCountryTableViewCell.mm */,
34212C061BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib */,
@ -1780,9 +1767,6 @@
34AF5FBB1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.h */,
34AF5FBC1BE398E6002AEAEE /* MWMMapDownloaderSubplaceTableViewCell.mm */,
343D18781BE8CE7200FCAFAC /* MWMMapDownloaderSubplaceTableViewCell.xib */,
34AF5FC11BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.h */,
34AF5FC21BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm */,
34AF5FC41BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib */,
);
path = MapDownloader;
sourceTree = "<group>";
@ -3009,7 +2993,6 @@
978D4A31199A11E600D72CA7 /* faq.html in Resources */,
3491E7CD1C06F1F10042FE24 /* MWMPlacePageButtonCell.xib in Resources */,
F66A8FB21B0A0954001B9C97 /* PlacePageView.xib in Resources */,
34212C031BE8972E00DB4B18 /* MWMMapDownloaderCountryTableViewCell.xib in Resources */,
349C26B61BB02C6F0005DF2F /* MWMBottomMenuViewController.xib in Resources */,
347FD8871C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.xib in Resources */,
F64F19A41AB81A00006EAF7E /* MWMDownloadTransitMapAlert.xib in Resources */,
@ -3058,6 +3041,7 @@
342F539D1C529AF100229014 /* WorldCoasts_migrate.mwm in Resources */,
F6CB21621AEE902B00FB8963 /* PlacePageLinkCell.xib in Resources */,
3401CD781C3CED1E0028C6F8 /* MWMEditorSelectTableViewCell.xib in Resources */,
341FAB981C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib in Resources */,
34212C071BE897C200DB4B18 /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */,
349A35841B53E967009677EE /* MWMDownloadMapRequest.xib in Resources */,
F6E0047B1B908CF5003BF5D8 /* MWMNiPadNavigationDashboard.xib in Resources */,
@ -3067,7 +3051,6 @@
347FD8691C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F607C1871C032A8800B53A87 /* resources-hdpi_clear in Resources */,
F6CB21641AEFC42800FB8963 /* PlacePageActionBar.xib in Resources */,
34AF5FC51BE3B66C002AEAEE /* MWMMapDownloaderTableViewHeader.xib in Resources */,
34F45E901B96E8B100AC93F8 /* MWMSearchTabButtonsView.xib in Resources */,
F6BD337A1B62400E00F2CE18 /* MWMPortraitNavigationDashboard.xib in Resources */,
F64F4B6F1B46A5380081A24A /* MWMDownloaderDialogCell.xib in Resources */,
@ -3107,12 +3090,10 @@
6741A94E1BF340DE002C974C /* MWMLandscapeNavigationDashboard.xib in Resources */,
F653CE0E1C6DEB2E00A453F1 /* MWMDropDown.xib in Resources */,
6741A94F1BF340DE002C974C /* MWMDefaultAlert.xib in Resources */,
34DDD5381BFDB0DA00407F2F /* MWMMapDownloaderCountryTableViewCell.xib in Resources */,
6741A9501BF340DE002C974C /* fonts_whitelist.txt in Resources */,
6741A9511BF340DE002C974C /* MWMDownloaderDialogHeader.xib in Resources */,
6741A9521BF340DE002C974C /* World.mwm in Resources */,
F607C18A1C032A8800B53A87 /* resources-hdpi_dark in Resources */,
34DDD5401BFDB10100407F2F /* MWMMapDownloaderTableViewHeader.xib in Resources */,
6741A9531BF340DE002C974C /* 01_dejavusans.ttf in Resources */,
6741A9541BF340DE002C974C /* 02_droidsans-fallback.ttf in Resources */,
6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */,
@ -3148,6 +3129,7 @@
6741A9681BF340DE002C974C /* faq.html in Resources */,
3491E7CE1C06F1F10042FE24 /* MWMPlacePageButtonCell.xib in Resources */,
6741A9691BF340DE002C974C /* PlacePageView.xib in Resources */,
341FAB991C68DA260006DD56 /* MWMMapDownloaderTableViewCell.xib in Resources */,
6741A96B1BF340DE002C974C /* MWMBottomMenuViewController.xib in Resources */,
6741A96C1BF340DE002C974C /* MWMDownloadTransitMapAlert.xib in Resources */,
6741A96D1BF340DE002C974C /* MWMLocationAlert.xib in Resources */,
@ -3270,7 +3252,6 @@
F6791B131C43DEA7007A8A6E /* MWMStartButton.mm in Sources */,
46F26CD810F623BA00ECCA39 /* EAGLView.mm in Sources */,
34F9FB8B1C438ADB00F71201 /* MWMStreetEditorViewController.mm in Sources */,
34AF5FC31BE3B656002AEAEE /* MWMMapDownloaderTableViewHeader.mm in Sources */,
EED10A4511F78D120095FAD4 /* MapViewController.mm in Sources */,
34CCFDD11C21945500F28959 /* MWMPlacePageOpeningHoursDayView.mm in Sources */,
3445CEAE1C2D9E08006F4226 /* MWMAuthorizationSignupViewController.mm in Sources */,
@ -3410,7 +3391,6 @@
342AF0E01BE24E9A0016F3AE /* MWMMapDownloaderViewController.mm in Sources */,
6BA0BCD11B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm in Sources */,
978F9244183B660F000D6C7C /* SwitchCell.mm in Sources */,
34AF5FB41BE38863002AEAEE /* MWMMapDownloaderCountryTableViewCell.mm in Sources */,
342AD7721B53D32F00E0B997 /* UIView+RuntimeAttributes.mm in Sources */,
F626D52E1C3E6CAA00C17D15 /* MWMTableViewCell.mm in Sources */,
34F9FB871C438ADB00F71201 /* MWMStreetEditorCommonTableViewCell.mm in Sources */,
@ -3568,13 +3548,11 @@
3401CD7E1C3CF1BE0028C6F8 /* MWMEditorSwitchTableViewCell.mm in Sources */,
34EB84591C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */,
6741A9FC1BF340DE002C974C /* iosOGLContextFactory.mm in Sources */,
34DDD5371BFDB0D300407F2F /* MWMMapDownloaderCountryTableViewCell.mm in Sources */,
6741A9FE1BF340DE002C974C /* SelectSetVC.mm in Sources */,
34BC1E571C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */,
347FD8681C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */,
6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */,
6741AA011BF340DE002C974C /* MWMSearchTabbedViewLayout.mm in Sources */,
34DDD53F1BFDB0FD00407F2F /* MWMMapDownloaderTableViewHeader.mm in Sources */,
6741AA021BF340DE002C974C /* BookmarksRootVC.mm in Sources */,
6741AA031BF340DE002C974C /* MWMActivityViewController.mm in Sources */,
34DDD5341BFDB0B600407F2F /* MWMMapDownloaderViewController.mm in Sources */,

View file

@ -48,10 +48,9 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="zBz-nW-lOz">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="zBz-nW-lOz">
<rect key="frame" x="0.0" y="64" width="600" height="536"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="eCI-mf-eCv" id="9zX-09-zAp"/>
<outlet property="delegate" destination="eCI-mf-eCv" id="nWw-Fy-ADM"/>
@ -192,10 +191,9 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="RAh-Cr-4I1">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="RAh-Cr-4I1">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="separatorColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="cIk-gU-IeI" id="LJR-hi-gzR"/>
<outlet property="delegate" destination="cIk-gU-IeI" id="d9Q-ue-dKw"/>