From fb46bab8a3a017ef57c986f78add5985fea30088 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:20:41 +0300 Subject: [PATCH 01/13] [cleanup] [ios] Refactored object class string identifier retrieval. --- iphone/Maps/Categories/Bundle+Init.swift | 5 ++ .../Categories/UICollectionView+Cells.swift | 9 ++++ iphone/Maps/Categories/UINib+Init.swift | 5 ++ .../Maps/Categories/UITableView+Cells.swift | 13 +++++ iphone/Maps/Categories/UIView+Id.swift | 3 ++ .../Classes/MWMTableViewCell+CellId.swift | 3 -- iphone/Maps/Common/Common.swift | 5 ++ iphone/Maps/Maps.xcodeproj/project.pbxproj | 48 +++++++++++++++---- 8 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 iphone/Maps/Categories/Bundle+Init.swift create mode 100644 iphone/Maps/Categories/UICollectionView+Cells.swift create mode 100644 iphone/Maps/Categories/UINib+Init.swift create mode 100644 iphone/Maps/Categories/UITableView+Cells.swift create mode 100644 iphone/Maps/Categories/UIView+Id.swift delete mode 100644 iphone/Maps/Classes/MWMTableViewCell+CellId.swift diff --git a/iphone/Maps/Categories/Bundle+Init.swift b/iphone/Maps/Categories/Bundle+Init.swift new file mode 100644 index 0000000000..52d23fc5b0 --- /dev/null +++ b/iphone/Maps/Categories/Bundle+Init.swift @@ -0,0 +1,5 @@ +extension Bundle { + func load(viewClass: AnyClass, owner: Any?, options: [AnyHashable : Any]? = nil) -> [Any]? { + return loadNibNamed(toString(viewClass), owner: owner, options: options) + } +} diff --git a/iphone/Maps/Categories/UICollectionView+Cells.swift b/iphone/Maps/Categories/UICollectionView+Cells.swift new file mode 100644 index 0000000000..b791cb3ed8 --- /dev/null +++ b/iphone/Maps/Categories/UICollectionView+Cells.swift @@ -0,0 +1,9 @@ +extension UICollectionView { + func register(cellClass: AnyClass) { + register(UINib(cellClass), forCellWithReuseIdentifier: toString(cellClass)) + } + + func dequeueReusableCell(withCellClass cellClass: AnyClass, indexPath: IndexPath) -> UICollectionViewCell { + return dequeueReusableCell(withReuseIdentifier: toString(cellClass), for: indexPath) + } +} diff --git a/iphone/Maps/Categories/UINib+Init.swift b/iphone/Maps/Categories/UINib+Init.swift new file mode 100644 index 0000000000..5b85731ee2 --- /dev/null +++ b/iphone/Maps/Categories/UINib+Init.swift @@ -0,0 +1,5 @@ +extension UINib { + convenience init(_ viewClass: AnyClass, bundle: Bundle? = nil) { + self.init(nibName: toString(viewClass), bundle: bundle) + } +} diff --git a/iphone/Maps/Categories/UITableView+Cells.swift b/iphone/Maps/Categories/UITableView+Cells.swift new file mode 100644 index 0000000000..5e732f28f6 --- /dev/null +++ b/iphone/Maps/Categories/UITableView+Cells.swift @@ -0,0 +1,13 @@ +extension UITableView { + func register(cellClass: AnyClass) { + register(UINib(cellClass), forCellReuseIdentifier: toString(cellClass)) + } + + func dequeueReusableCell(withCellClass cellClass: AnyClass) -> UITableViewCell? { + return dequeueReusableCell(withIdentifier: toString(cellClass)) + } + + func dequeueReusableCell(withCellClass cellClass: AnyClass, indexPath: IndexPath) -> UITableViewCell { + return dequeueReusableCell(withIdentifier: toString(cellClass), for: indexPath) + } +} diff --git a/iphone/Maps/Categories/UIView+Id.swift b/iphone/Maps/Categories/UIView+Id.swift new file mode 100644 index 0000000000..ac721e98ae --- /dev/null +++ b/iphone/Maps/Categories/UIView+Id.swift @@ -0,0 +1,3 @@ +extension UIView { + static func stringId() -> String { return toString(self) } +} diff --git a/iphone/Maps/Classes/MWMTableViewCell+CellId.swift b/iphone/Maps/Classes/MWMTableViewCell+CellId.swift deleted file mode 100644 index 2f07f390cd..0000000000 --- a/iphone/Maps/Classes/MWMTableViewCell+CellId.swift +++ /dev/null @@ -1,3 +0,0 @@ -extension MWMTableViewCell { - static func cellId() -> String { return String(describing: self) } -} diff --git a/iphone/Maps/Common/Common.swift b/iphone/Maps/Common/Common.swift index 7e370eb4a8..6270c63f78 100644 --- a/iphone/Maps/Common/Common.swift +++ b/iphone/Maps/Common/Common.swift @@ -11,8 +11,13 @@ func iPadSpecific( _ f: () -> Void) { f() } } + func iPhoneSpecific( _ f: () -> Void) { if !IPAD() { f() } } + +func toString(_ cls: AnyClass) -> String { + return String(describing: cls) +} diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 664ac5cfd8..4d865affb8 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -12,9 +12,6 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 288765080DF74369002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765070DF74369002DB57D /* CoreGraphics.framework */; }; - 3400AB381E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3400AB371E02E8CE004036E2 /* MWMTableViewCell+CellId.swift */; }; - 3400AB391E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3400AB371E02E8CE004036E2 /* MWMTableViewCell+CellId.swift */; }; - 3400AB3A1E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3400AB371E02E8CE004036E2 /* MWMTableViewCell+CellId.swift */; }; 340474F01E08199D00C92850 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DC1E08199D00C92850 /* Crashlytics.framework */; }; 340474F11E08199D00C92850 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DC1E08199D00C92850 /* Crashlytics.framework */; }; 340474F21E08199D00C92850 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340474DC1E08199D00C92850 /* Crashlytics.framework */; }; @@ -327,6 +324,21 @@ 34D3AFE11E376F7E004100F9 /* UITableView+Updates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */; }; 34D3AFE21E376F7E004100F9 /* UITableView+Updates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */; }; 34D3AFE31E376F7E004100F9 /* UITableView+Updates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */; }; + 34D3AFE91E378AF1004100F9 /* UINib+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */; }; + 34D3AFEA1E378AF1004100F9 /* UINib+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */; }; + 34D3AFEB1E378AF1004100F9 /* UINib+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */; }; + 34D3AFED1E378D61004100F9 /* UIView+Id.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */; }; + 34D3AFEE1E378D61004100F9 /* UIView+Id.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */; }; + 34D3AFEF1E378D61004100F9 /* UIView+Id.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */; }; + 34D3AFF11E37945B004100F9 /* UITableView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */; }; + 34D3AFF21E37945B004100F9 /* UITableView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */; }; + 34D3AFF31E37945B004100F9 /* UITableView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */; }; + 34D3AFF51E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; + 34D3AFF61E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; + 34D3AFF71E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; + 34D3B04E1E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; + 34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; + 34D3B0501E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; 34D4FA621E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; 34D4FA631E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; 34D4FA641E26572D003F53EF /* FirstLaunchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */; }; @@ -1383,7 +1395,6 @@ 288765070DF74369002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = Maps_Prefix.pch; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = main.mm; sourceTree = ""; }; - 3400AB371E02E8CE004036E2 /* MWMTableViewCell+CellId.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MWMTableViewCell+CellId.swift"; sourceTree = ""; }; 340474DC1E08199D00C92850 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = ""; }; 340474DD1E08199D00C92850 /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; 340474DE1E08199D00C92850 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FBSDKCoreKit.framework; sourceTree = ""; }; @@ -1610,6 +1621,11 @@ 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AddSetTableViewCell.mm; sourceTree = ""; }; 34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddSetTableViewCell.xib; sourceTree = ""; }; 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Updates.swift"; sourceTree = ""; }; + 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINib+Init.swift"; sourceTree = ""; }; + 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Id.swift"; sourceTree = ""; }; + 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Cells.swift"; sourceTree = ""; }; + 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Cells.swift"; sourceTree = ""; }; + 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Init.swift"; sourceTree = ""; }; 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstLaunchController.swift; sourceTree = ""; }; 34D4FA651E265749003F53EF /* WhatsNewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhatsNewController.swift; sourceTree = ""; }; 34F73F601E082FF700AC1FD6 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -2358,7 +2374,6 @@ F613FA741AB330AF002394D4 /* MapViewController */, F626D52C1C3E6CAA00C17D15 /* MWMTableViewCell.h */, F626D52D1C3E6CAA00C17D15 /* MWMTableViewCell.mm */, - 3400AB371E02E8CE004036E2 /* MWMTableViewCell+CellId.swift */, F607C18B1C047FCA00B53A87 /* Segue */, 340837101B7243B500B5C185 /* Share */, F6588E291B15C25C00EE1E58 /* TextView */, @@ -2696,6 +2711,11 @@ 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.mm */, 34F7422F1E0834F400AC1FD6 /* UIViewController+Navigation.h */, 34F742301E0834F400AC1FD6 /* UIViewController+Navigation.mm */, + 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */, + 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */, + 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */, + 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */, + 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */, ); path = Categories; sourceTree = ""; @@ -4642,6 +4662,7 @@ files = ( 34845DB61E166084003D55B9 /* Common.swift in Sources */, 1D60589B0D05DD56006BFB54 /* main.mm in Sources */, + 34D3B04E1E38A20C004100F9 /* Bundle+Init.swift in Sources */, 340837161B72451A00B5C185 /* MWMShareActivityItem.mm in Sources */, F6E2FF0B1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCD1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -4653,6 +4674,7 @@ F6E2FF5C1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */, F6E2FDE81E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */, F64F199D1AB81A00006EAF7E /* MWMDefaultAlert.mm in Sources */, + 34D3AFF51E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */, F6E2FEC01E097BA00083EBEC /* MWMConsole.mm in Sources */, 3490D2DE1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */, F6E2FDF71E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */, @@ -4697,6 +4719,7 @@ 34FE4C451BCC013500066718 /* MWMMapWidgets.mm in Sources */, F6E2FE4B1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757D1E081B3300C92850 /* iosOGLContext.mm in Sources */, + 34D3AFF11E37945B004100F9 /* UITableView+Cells.swift in Sources */, F6E2FD5B1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, 340475611E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, 342EE4111C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, @@ -4767,6 +4790,7 @@ F6E2FE3C1E097BA00083EBEC /* MWMMigrationViewController.mm in Sources */, F6E2FD4F1E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, F6E2FE871E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, + 34D3AFE91E378AF1004100F9 /* UINib+Init.swift in Sources */, F6E2FD7F1E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, F6BD33871B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm in Sources */, FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */, @@ -4854,7 +4878,6 @@ F6E2FE961E097BA00083EBEC /* ContextViews.mm in Sources */, F64F4B6D1B46A51F0081A24A /* MWMDownloaderDialogCell.mm in Sources */, 340475761E081A4600C92850 /* MWMTrafficManager.mm in Sources */, - 3400AB381E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */, 346B42AB1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, F6E2FF021E097BA00083EBEC /* MWMSearchHistoryClearCell.mm in Sources */, F63774EA1B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm in Sources */, @@ -4879,6 +4902,7 @@ F6E2FEEA1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */, F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, 3454D7D91E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */, + 34D3AFED1E378D61004100F9 /* UIView+Id.swift in Sources */, F6E2FD9D1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, F6E2FE091E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 3454D7E21E07F045004AF2AD /* UITextView+RuntimeAttributes.mm in Sources */, @@ -4895,6 +4919,7 @@ files = ( 34845DB71E166084003D55B9 /* Common.swift in Sources */, 6741A9A31BF340DE002C974C /* main.mm in Sources */, + 34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */, F67E751E1DB76DFC00D6741F /* MWMTaxiCollectionLayout.mm in Sources */, F6E2FF0C1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCE1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -4906,6 +4931,7 @@ F6E2FF5D1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */, F6E2FDE91E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */, 6741A9A81BF340DE002C974C /* MWMFacebookAlert.mm in Sources */, + 34D3AFF61E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */, 6741A9A91BF340DE002C974C /* MWMDefaultAlert.mm in Sources */, F6E2FEC11E097BA00083EBEC /* MWMConsole.mm in Sources */, 3490D2DF1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */, @@ -4950,6 +4976,7 @@ F6E2FE4C1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, F6E2FD5C1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, + 34D3AFF21E37945B004100F9 /* UITableView+Cells.swift in Sources */, F653CE191C71F62700A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */, 340475621E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, F6E2FEE51E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, @@ -5020,6 +5047,7 @@ F6E2FD501E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, F6E2FE881E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, F6E2FD801E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, + 34D3AFEA1E378AF1004100F9 /* UINib+Init.swift in Sources */, 6741A9F11BF340DE002C974C /* MWMNavigationDashboardEntity.mm in Sources */, 56C74C391C74A3BC00B71B9F /* MWMInputEmailValidator.mm in Sources */, 6741A9F51BF340DE002C974C /* BookmarksVC.mm in Sources */, @@ -5105,7 +5133,6 @@ 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.mm in Sources */, F6E2FE971E097BA00083EBEC /* ContextViews.mm in Sources */, 6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */, - 3400AB391E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */, 340475771E081A4600C92850 /* MWMTrafficManager.mm in Sources */, 346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, 6741AA221BF340DE002C974C /* MWMNavigationView.mm in Sources */, @@ -5132,6 +5159,7 @@ F6E2FEEB1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */, F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, F6E2FD9E1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, + 34D3AFEE1E378D61004100F9 /* UIView+Id.swift in Sources */, F6E2FE0A1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 3454D7DA1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */, 3454D7E31E07F045004AF2AD /* UITextView+RuntimeAttributes.mm in Sources */, @@ -5148,6 +5176,7 @@ files = ( 34845DB81E166084003D55B9 /* Common.swift in Sources */, 849CF6821DE842290024A8A5 /* main.mm in Sources */, + 34D3B0501E38A20C004100F9 /* Bundle+Init.swift in Sources */, 3454D7D51E07F045004AF2AD /* UIImageView+Coloring.mm in Sources */, F6E2FF0D1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, F6E2FDCF1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, @@ -5159,6 +5188,7 @@ F6E2FF5E1E097BA00083EBEC /* MWMRecentTrackSettingsController.mm in Sources */, F6E2FDEA1E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */, 849CF68A1DE842290024A8A5 /* MWMDefaultAlert.mm in Sources */, + 34D3AFF71E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */, 340475601E081A4600C92850 /* MWMLocationPredictor.mm in Sources */, F6E2FEC21E097BA00083EBEC /* MWMConsole.mm in Sources */, 845E4B1C1DEC839800D6BED8 /* MWMTrafficButtonViewController.mm in Sources */, @@ -5203,6 +5233,7 @@ 849CF6B11DE842290024A8A5 /* MWMMapWidgets.mm in Sources */, F6E2FE4D1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 340475631E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, + 34D3AFF31E37945B004100F9 /* UITableView+Cells.swift in Sources */, F6E2FD5D1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, 3454D7DB1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */, 3454D7BD1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */, @@ -5273,6 +5304,7 @@ F6E2FE3E1E097BA00083EBEC /* MWMMigrationViewController.mm in Sources */, F6E2FD511E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, F6E2FE891E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, + 34D3AFEB1E378AF1004100F9 /* UINib+Init.swift in Sources */, F6E2FD811E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, 849CF6EB1DE842290024A8A5 /* MWMAPIBar.mm in Sources */, 3404755D1E081A4600C92850 /* MWMLocationManager.mm in Sources */, @@ -5317,7 +5349,6 @@ 849CF7191DE842290024A8A5 /* MWMActivityViewController.mm in Sources */, 849CF71A1DE842290024A8A5 /* MWMDropDown.mm in Sources */, F6E2FF4F1E097BA00083EBEC /* MWMAboutController.mm in Sources */, - 3400AB3A1E02E8CE004036E2 /* MWMTableViewCell+CellId.swift in Sources */, 849CF71D1DE842290024A8A5 /* MWMNavigationDashboardManager.mm in Sources */, 3454D7C91E07F045004AF2AD /* UIButton+RuntimeAttributes.mm in Sources */, F6E2FEDA1E097BA00083EBEC /* MWMSearchContentView.mm in Sources */, @@ -5385,6 +5416,7 @@ F6E2FEEC1E097BA00083EBEC /* MWMSearchTextField.mm in Sources */, 3454D7DE1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */, 849CF7671DE842290024A8A5 /* CircleView.mm in Sources */, + 34D3AFEF1E378D61004100F9 /* UIView+Id.swift in Sources */, F6E2FD9F1E097BA00083EBEC /* MWMEditBookmarkController.mm in Sources */, F6E2FE0B1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, 849CF7691DE842290024A8A5 /* MWMTaxiPreviewCell.mm in Sources */, From 66bcddab296b949c0ca3bb9ab83e3c3f7f767463 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:22:55 +0300 Subject: [PATCH 02/13] [cleanup] [ios] Circular progress code cleanup. --- .../CustomViews/CircularProgress/MWMCircularProgress.mm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgress.mm b/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgress.mm index 93999f36b8..af257a6bba 100644 --- a/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgress.mm +++ b/iphone/Maps/Classes/CustomViews/CircularProgress/MWMCircularProgress.mm @@ -1,11 +1,6 @@ #import "MWMCircularProgress.h" #import "MWMCircularProgressView.h" - -namespace -{ -UINib * const progressViewNib = - [UINib nibWithNibName:@"MWMCircularProgress" bundle:[NSBundle mainBundle]]; -} // namespace +#import "SwiftBridge.h" @interface MWMCircularProgressView () @@ -53,7 +48,7 @@ UINib * const progressViewNib = self = [super init]; if (self) { - [progressViewNib instantiateWithOwner:self options:nil]; + [[[UINib alloc] init:[self class] bundle:nil] instantiateWithOwner:self options:nil]; [parentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; [parentView addSubview:self.rootView]; self.state = MWMCircularProgressStateNormal; From 7795cd1ba659f8e98e315a63ea20a52f5802fe50 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:23:34 +0300 Subject: [PATCH 03/13] [cleanup] [ios] Download transit map alert code cleanup. --- .../DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm index 81f07963b7..4f11152439 100644 --- a/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm +++ b/iphone/Maps/Classes/CustomAlert/DownloadTransitMapsAlert/MWMDownloadTransitMapAlert.mm @@ -14,7 +14,6 @@ namespace { -NSString * const kCellIdentifier = @"MWMDownloaderDialogCell"; NSString * const kDownloadTransitMapAlertNibName = @"MWMDownloadTransitMapAlert"; NSString * const kStatisticsEvent = @"Map download Alert"; @@ -106,7 +105,7 @@ CGFloat const kAnimationDuration = .05; - (void)configure { - [self.dialogsTableView registerNib:[UINib nibWithNibName:kCellIdentifier bundle:nil] forCellReuseIdentifier:kCellIdentifier]; + [self.dialogsTableView registerWithCellClass:[MWMDownloaderDialogCell class]]; self.listExpanded = NO; CALayer * containerViewLayer = self.containerView.layer; containerViewLayer.shouldRasterize = YES; @@ -323,7 +322,9 @@ CGFloat const kAnimationDuration = .05; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - MWMDownloaderDialogCell * cell = (MWMDownloaderDialogCell *)[tableView dequeueReusableCellWithIdentifier:kCellIdentifier]; + Class cls = [MWMDownloaderDialogCell class]; + auto cell = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); cell.titleLabel.text = self.countriesNames[indexPath.row]; return cell; } From 50f34f38a9649f4926fca73e4b1bd44ef76e1951 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:24:16 +0300 Subject: [PATCH 04/13] [cleanup] [ios] Settings code cleanup. --- .../UI/Settings/MWMTTSLanguageViewController.mm | 4 ++-- .../UI/Settings/MWMTTSSettingsViewController.mm | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm b/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm index aad7871960..dbf3275dcf 100644 --- a/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm +++ b/iphone/Maps/UI/Settings/MWMTTSLanguageViewController.mm @@ -34,9 +34,9 @@ static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings"; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - auto cellId = [SettingsTableViewSelectableCell cellId]; + Class cls = [SettingsTableViewSelectableCell class]; auto cell = static_cast( - [tableView dequeueReusableCellWithIdentifier:cellId]); + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configWithTitle:@([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str())]; return cell; diff --git a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm index 5ac1c4db05..21dd3d6a00 100644 --- a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm @@ -108,9 +108,9 @@ using namespace locale_translator; { if (indexPath.row == 0) { - auto cellId = [SettingsTableViewSelectableCell cellId]; + Class cls = [SettingsTableViewSelectableCell class]; auto cell = static_cast( - [tableView dequeueReusableCellWithIdentifier:cellId]); + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configWithTitle:L(@"duration_disabled")]; cell.accessoryType = [MWMTextToSpeech isTTSEnabled] ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark; @@ -121,17 +121,17 @@ using namespace locale_translator; NSInteger const row = indexPath.row - 1; if (row == _languages.size()) { - auto cellId = [SettingsTableViewLinkCell cellId]; + Class cls = [SettingsTableViewLinkCell class]; auto cell = static_cast( - [tableView dequeueReusableCellWithIdentifier:cellId]); + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configWithTitle:L(@"pref_tts_other_section_title") info:nil]; return cell; } else { - auto cellId = [SettingsTableViewSelectableCell cellId]; + Class cls = [SettingsTableViewSelectableCell class]; auto cell = static_cast( - [tableView dequeueReusableCellWithIdentifier:cellId]); + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); pair const p = _languages[row]; [cell configWithTitle:@(p.second.c_str())]; BOOL const isSelected = @@ -145,9 +145,9 @@ using namespace locale_translator; } else { - auto cellId = [SettingsTableViewLinkCell cellId]; + Class cls = [SettingsTableViewLinkCell class]; auto cell = static_cast( - [tableView dequeueReusableCellWithIdentifier:cellId]); + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configWithTitle:L(@"pref_tts_how_to_set_up_voice") info:nil]; return cell; } From 0d1d127714c444bddbf76e003e67483a98afc7e6 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:25:03 +0300 Subject: [PATCH 05/13] [cleanup] [ios] Search code cleanup. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 40 +----- .../BookmarksTab/MWMSearchBookmarksCell.h | 10 -- .../BookmarksTab/MWMSearchBookmarksCell.mm | 91 ------------- .../BookmarksTab/MWMSearchBookmarksCell.xib | 125 ------------------ .../BookmarksTab/MWMSearchBookmarksManager.h | 10 -- .../BookmarksTab/MWMSearchBookmarksManager.mm | 120 ----------------- .../MWMSearchCategoriesManager.mm | 10 +- .../HistoryTab/MWMSearchHistoryManager.mm | 27 ++-- .../MWMSearchTabbedViewController.mm | 11 +- .../TableView/MWMSearchTableViewController.mm | 86 +++--------- 10 files changed, 42 insertions(+), 488 deletions(-) delete mode 100644 iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.h delete mode 100644 iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.mm delete mode 100644 iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.xib delete mode 100644 iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.h delete mode 100644 iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.mm diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 4d865affb8..393cca9edc 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -1209,15 +1209,6 @@ F6E2FEED1E097BA00083EBEC /* MWMSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD011E097B9F0083EBEC /* MWMSearchView.xib */; }; F6E2FEEE1E097BA00083EBEC /* MWMSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD011E097B9F0083EBEC /* MWMSearchView.xib */; }; F6E2FEEF1E097BA00083EBEC /* MWMSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD011E097B9F0083EBEC /* MWMSearchView.xib */; }; - F6E2FEF01E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD051E097B9F0083EBEC /* MWMSearchBookmarksCell.mm */; }; - F6E2FEF11E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD051E097B9F0083EBEC /* MWMSearchBookmarksCell.mm */; }; - F6E2FEF21E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD051E097B9F0083EBEC /* MWMSearchBookmarksCell.mm */; }; - F6E2FEF31E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD061E097B9F0083EBEC /* MWMSearchBookmarksCell.xib */; }; - F6E2FEF41E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD061E097B9F0083EBEC /* MWMSearchBookmarksCell.xib */; }; - F6E2FEF51E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FD061E097B9F0083EBEC /* MWMSearchBookmarksCell.xib */; }; - F6E2FEF61E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD081E097B9F0083EBEC /* MWMSearchBookmarksManager.mm */; }; - F6E2FEF71E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD081E097B9F0083EBEC /* MWMSearchBookmarksManager.mm */; }; - F6E2FEF81E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD081E097B9F0083EBEC /* MWMSearchBookmarksManager.mm */; }; F6E2FEF91E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD0B1E097B9F0083EBEC /* MWMSearchCategoriesManager.mm */; }; F6E2FEFA1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD0B1E097B9F0083EBEC /* MWMSearchCategoriesManager.mm */; }; F6E2FEFB1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FD0B1E097B9F0083EBEC /* MWMSearchCategoriesManager.mm */; }; @@ -2091,11 +2082,6 @@ F6E2FCFF1E097B9F0083EBEC /* MWMSearchTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTextField.h; sourceTree = ""; }; F6E2FD001E097B9F0083EBEC /* MWMSearchTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTextField.mm; sourceTree = ""; }; F6E2FD011E097B9F0083EBEC /* MWMSearchView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchView.xib; sourceTree = ""; }; - F6E2FD041E097B9F0083EBEC /* MWMSearchBookmarksCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchBookmarksCell.h; sourceTree = ""; }; - F6E2FD051E097B9F0083EBEC /* MWMSearchBookmarksCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchBookmarksCell.mm; sourceTree = ""; }; - F6E2FD061E097B9F0083EBEC /* MWMSearchBookmarksCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchBookmarksCell.xib; sourceTree = ""; }; - F6E2FD071E097B9F0083EBEC /* MWMSearchBookmarksManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchBookmarksManager.h; sourceTree = ""; }; - F6E2FD081E097B9F0083EBEC /* MWMSearchBookmarksManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchBookmarksManager.mm; sourceTree = ""; }; F6E2FD0A1E097B9F0083EBEC /* MWMSearchCategoriesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchCategoriesManager.h; sourceTree = ""; }; F6E2FD0B1E097B9F0083EBEC /* MWMSearchCategoriesManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchCategoriesManager.mm; sourceTree = ""; }; F6E2FD0C1E097B9F0083EBEC /* MWMSearchCategoryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchCategoryCell.h; sourceTree = ""; }; @@ -2105,7 +2091,7 @@ F6E2FD111E097B9F0083EBEC /* MWMSearchHistoryClearCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHistoryClearCell.mm; sourceTree = ""; }; F6E2FD121E097B9F0083EBEC /* MWMSearchHistoryClearCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchHistoryClearCell.xib; sourceTree = ""; }; F6E2FD131E097B9F0083EBEC /* MWMSearchHistoryManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryManager.h; sourceTree = ""; }; - F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHistoryManager.mm; sourceTree = ""; }; + F6E2FD141E097B9F0083EBEC /* MWMSearchHistoryManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchHistoryManager.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FD151E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryMyPositionCell.h; sourceTree = ""; }; F6E2FD161E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHistoryMyPositionCell.mm; sourceTree = ""; }; F6E2FD171E097B9F0083EBEC /* MWMSearchHistoryMyPositionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchHistoryMyPositionCell.xib; sourceTree = ""; }; @@ -2135,7 +2121,7 @@ F6E2FD311E097BA00083EBEC /* MWMSearchTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTableView.h; sourceTree = ""; }; F6E2FD321E097BA00083EBEC /* MWMSearchTableView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTableView.mm; sourceTree = ""; }; F6E2FD331E097BA00083EBEC /* MWMSearchTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTableViewController.h; sourceTree = ""; }; - F6E2FD341E097BA00083EBEC /* MWMSearchTableViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTableViewController.mm; sourceTree = ""; }; + F6E2FD341E097BA00083EBEC /* MWMSearchTableViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchTableViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FD351E097BA00083EBEC /* MWMSearchTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTableViewController.xib; sourceTree = ""; }; F6E2FD381E097BA00083EBEC /* SettingsTableViewLinkCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewLinkCell.swift; sourceTree = ""; }; F6E2FD391E097BA00083EBEC /* SettingsTableViewSelectableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSelectableCell.swift; sourceTree = ""; }; @@ -3740,7 +3726,6 @@ F6E2FD021E097B9F0083EBEC /* TabbedView */ = { isa = PBXGroup; children = ( - F6E2FD031E097B9F0083EBEC /* BookmarksTab */, F6E2FD091E097B9F0083EBEC /* CategoriesTab */, F6E2FD0F1E097B9F0083EBEC /* HistoryTab */, F6E2FD1B1E097B9F0083EBEC /* MWMSearchTabbedCollectionViewCell.h */, @@ -3756,18 +3741,6 @@ path = TabbedView; sourceTree = ""; }; - F6E2FD031E097B9F0083EBEC /* BookmarksTab */ = { - isa = PBXGroup; - children = ( - F6E2FD041E097B9F0083EBEC /* MWMSearchBookmarksCell.h */, - F6E2FD051E097B9F0083EBEC /* MWMSearchBookmarksCell.mm */, - F6E2FD061E097B9F0083EBEC /* MWMSearchBookmarksCell.xib */, - F6E2FD071E097B9F0083EBEC /* MWMSearchBookmarksManager.h */, - F6E2FD081E097B9F0083EBEC /* MWMSearchBookmarksManager.mm */, - ); - path = BookmarksTab; - sourceTree = ""; - }; F6E2FD091E097B9F0083EBEC /* CategoriesTab */ = { isa = PBXGroup; children = ( @@ -4249,7 +4222,6 @@ F6E2FDEE1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */, 4A7D89C61B2EBF3B00AC843E /* resources-mdpi_dark in Resources */, F6E2FE5D1E097BA00083EBEC /* MWMPPPreviewBannerCell.xib in Resources */, - F6E2FEF31E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */, 349D1AE01E2E325C004A2006 /* MWMBottomMenuViewController.xib in Resources */, F6E2FD941E097BA00083EBEC /* MWMBookmarkColorViewController.xib in Resources */, F6E2FDD01E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */, @@ -4386,7 +4358,6 @@ F6E2FDB91E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */, F6E2FDCB1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */, 6741A97E1BF340DE002C974C /* drules_proto_dark.bin in Resources */, - F6E2FEF41E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */, F6E2FEB21E097BA00083EBEC /* _MWMPPPSchedule.xib in Resources */, F6B97B2A1CD0CB170009B612 /* MWMBookmarkNameCell.xib in Resources */, F6E2FE071E097BA00083EBEC /* MWMOpeningHoursDaysSelectorTableViewCell.xib in Resources */, @@ -4494,7 +4465,6 @@ 349D1AD61E2E325C004A2006 /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */, F6E2FEAD1E097BA00083EBEC /* _MWMPPPBooking.xib in Resources */, 849CF6111DE842290024A8A5 /* tts-how-to-set-up-voice-img in Resources */, - F6E2FEF51E097BA00083EBEC /* MWMSearchBookmarksCell.xib in Resources */, 849CF6141DE842290024A8A5 /* resources-default in Resources */, F6E2FE0E1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */, F6E2FE861E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */, @@ -4727,7 +4697,6 @@ F6E2FF621E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, F64D9C9F1C899C350063FA30 /* MWMEditorViralAlert.mm in Sources */, 34ABA62C1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */, - F6E2FEF61E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */, 34845DAE1E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */, 34ABA6161C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */, F6E2FEDE1E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */, @@ -4886,7 +4855,6 @@ 3404754C1E081A4600C92850 /* MWMKeyboard.mm in Sources */, F6E2FDA61E097BA00083EBEC /* MWMButtonCell.mm in Sources */, F6BD33841B6240F200F2CE18 /* MWMNavigationView.mm in Sources */, - F6E2FEF01E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */, F6E2FE721E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, 34AB39C11D2BD8310021857D /* MWMStopButton.mm in Sources */, F6E2FF5F1E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, @@ -4982,7 +4950,6 @@ F6E2FEE51E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, F6E2FF631E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, 342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, - F6E2FEF71E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */, 34845DAF1E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */, F6791B141C43DF0B007A8A6E /* MWMStartButton.mm in Sources */, F6E2FEDF1E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */, @@ -5142,7 +5109,6 @@ 3404754D1E081A4600C92850 /* MWMKeyboard.mm in Sources */, 34EF94291C05A6F30050B714 /* MWMSegue.mm in Sources */, F6E2FDA71E097BA00083EBEC /* MWMButtonCell.mm in Sources */, - F6E2FEF11E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */, F6E2FE731E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, F6E2FE2B1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.mm in Sources */, @@ -5241,7 +5207,6 @@ 849CF6BD1DE842290024A8A5 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, F6E2FF641E097BA00083EBEC /* MWMTTSLanguageViewController.mm in Sources */, 849CF6C31DE842290024A8A5 /* MWMEditorViralAlert.mm in Sources */, - F6E2FEF81E097BA00083EBEC /* MWMSearchBookmarksManager.mm in Sources */, 34845DB01E1649F6003D55B9 /* DownloaderNoResultsEmbedViewController.swift in Sources */, 3454D7E11E07F045004AF2AD /* UITextField+RuntimeAttributes.mm in Sources */, F6E2FEE01E097BA00083EBEC /* MWMSearchManager+Layout.mm in Sources */, @@ -5400,7 +5365,6 @@ 849CF7561DE842290024A8A5 /* MWMRoutingDisclaimerAlert.mm in Sources */, F6E2FDA81E097BA00083EBEC /* MWMButtonCell.mm in Sources */, 849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */, - F6E2FEF21E097BA00083EBEC /* MWMSearchBookmarksCell.mm in Sources */, F6E2FE741E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, 3454D7E71E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */, F6E2FF611E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, diff --git a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.h b/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.h deleted file mode 100644 index 74cfb53e4a..0000000000 --- a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "MWMTableViewCell.h" - -@interface MWMSearchBookmarksCell : MWMTableViewCell - -- (void)configForIndex:(NSInteger)index; - -+ (CGFloat)defaultCellHeight; -- (CGFloat)cellHeight; - -@end diff --git a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.mm b/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.mm deleted file mode 100644 index 7adae67e82..0000000000 --- a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.mm +++ /dev/null @@ -1,91 +0,0 @@ -#import "BookmarksVC.h" -#import "MWMCommon.h" -#import "MWMSearchBookmarksCell.h" - -#include "Framework.h" - -@interface MWMSearchBookmarksCell () - -@property (nonatomic) NSInteger index; -@property (nonatomic) BOOL isVisible; -@property (nonatomic) NSUInteger count; - -@property (weak, nonatomic) IBOutlet UIButton * visibilityButton; -@property (weak, nonatomic) IBOutlet UILabel * titleLabel; -@property (weak, nonatomic) IBOutlet UILabel * countLabel; -@property (weak, nonatomic) IBOutlet UIImageView * openArrow; - -@end - -@implementation MWMSearchBookmarksCell - -- (void)awakeFromNib -{ - [super awakeFromNib]; - if (IPAD) - self.contentView.backgroundColor = [UIColor white]; - self.layer.shouldRasterize = YES; - self.layer.rasterizationScale = UIScreen.mainScreen.scale; -} - -- (void)configForIndex:(NSInteger)index -{ - BookmarkCategory * cat = GetFramework().GetBmCategory(index); - self.index = index; - self.isVisible = cat->IsVisible(); - size_t userMarksCount = 0; - { - BookmarkCategory::Guard guard(*cat); - userMarksCount = guard.m_controller.GetUserMarkCount(); - } - self.count = userMarksCount + cat->GetTracksCount(); - self.titleLabel.text = @(cat->GetName().c_str()); -} - -- (IBAction)toggleVisibility -{ - self.isVisible = !self.isVisible; - BookmarkCategory * cat = GetFramework().GetBmCategory(self.index); - { - BookmarkCategory::Guard guard(*cat); - guard.m_controller.SetIsVisible(self.isVisible); - } - cat->SaveToKMLFile(); -} - -- (IBAction)openBookmarks -{ - BookmarksVC * bvc = [[BookmarksVC alloc] initWithCategory:self.index]; - UINavigationController * rootVC = (UINavigationController *)UIApplication.sharedApplication.delegate.window.rootViewController; - [rootVC pushViewController:bvc animated:YES]; -} - -- (void)setTitle:(NSString *)title -{ - self.titleLabel.text = title; -} - -+ (CGFloat)defaultCellHeight -{ - return 44.0; -} - -- (CGFloat)cellHeight -{ - return ceil([self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height); -} - -#pragma mark - Properties - -- (void)setIsVisible:(BOOL)isVisible -{ - _isVisible = self.visibilityButton.selected = isVisible; -} - -- (void)setCount:(NSUInteger)count -{ - _count = count; - self.countLabel.text = @(count).stringValue; -} - -@end diff --git a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.xib b/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.xib deleted file mode 100644 index 2238675270..0000000000 --- a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksCell.xib +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.h b/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.h deleted file mode 100644 index d7a2a7ba88..0000000000 --- a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "MWMSearchTabbedCollectionViewCell.h" -#import "MWMSearchTabbedViewProtocol.h" - -@interface MWMSearchBookmarksManager : NSObject - -@property (weak, nonatomic) id delegate; - -- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell; - -@end diff --git a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.mm b/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.mm deleted file mode 100644 index 8d40eb670a..0000000000 --- a/iphone/Maps/UI/Search/TabbedView/BookmarksTab/MWMSearchBookmarksManager.mm +++ /dev/null @@ -1,120 +0,0 @@ -#import "MWMSearchBookmarksManager.h" -#import "MWMSearchBookmarksCell.h" -#import "MWMSearchNoResults.h" - -#include "Framework.h" - -extern NSString * const kBookmarksChangedNotification; - -static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell"; - -@interface MWMSearchBookmarksManager () - -@property(weak, nonatomic) MWMSearchTabbedCollectionViewCell * cell; - -@property(nonatomic) MWMSearchBookmarksCell * sizingCell; -@property(nonatomic) MWMSearchNoResults * noResultsView; - -@end - -@implementation MWMSearchBookmarksManager - -- (instancetype)init -{ - self = [super init]; - if (self) - { - [NSNotificationCenter.defaultCenter addObserver:self - selector:@selector(updateCell) - name:kBookmarksChangedNotification - object:nil]; - } - return self; -} - -- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; } -- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell -{ - self.cell = cell; - [self updateCell]; -} - -- (void)updateCell -{ - MWMSearchTabbedCollectionViewCell * cell = self.cell; - if (!cell) - return; - if (GetFramework().GetBmCategoriesCount() > 0) - { - [cell removeNoResultsView]; - UITableView * tableView = cell.tableView; - tableView.hidden = NO; - tableView.delegate = self; - tableView.dataSource = self; - [tableView registerNib:[UINib nibWithNibName:kBookmarksCellIdentifier bundle:nil] - forCellReuseIdentifier:kBookmarksCellIdentifier]; - [tableView reloadData]; - } - else - { - cell.tableView.hidden = YES; - [cell addNoResultsView:self.noResultsView]; - } -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return GetFramework().GetBmCategoriesCount(); -} - -- (UITableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:kBookmarksCellIdentifier]; - return cell; -} - -#pragma mark - UITableViewDelegate - -- (CGFloat)tableView:(UITableView *)tableView - estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return MWMSearchBookmarksCell.defaultCellHeight; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath -{ - [self.sizingCell configForIndex:indexPath.row]; - return self.sizingCell.cellHeight; -} - -- (void)tableView:(UITableView *)tableView - willDisplayCell:(MWMSearchBookmarksCell *)cell - forRowAtIndexPath:(NSIndexPath *)indexPath -{ - [cell configForIndex:indexPath.row]; -} - -#pragma mark - Properties - -- (MWMSearchBookmarksCell *)sizingCell -{ - if (!_sizingCell) - _sizingCell = [self.cell.tableView dequeueReusableCellWithIdentifier:kBookmarksCellIdentifier]; - return _sizingCell; -} - -- (MWMSearchNoResults *)noResultsView -{ - if (!_noResultsView) - { - _noResultsView = [MWMSearchNoResults viewWithImage:[UIImage imageNamed:@"img_bookmarks"] - title:L(@"search_bookmarks_no_results_title") - text:L(@"search_bookmarks_no_results_text")]; - } - return _noResultsView; -} - -@end diff --git a/iphone/Maps/UI/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm b/iphone/Maps/UI/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm index 520fdefb89..3e76b3eae9 100644 --- a/iphone/Maps/UI/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm +++ b/iphone/Maps/UI/Search/TabbedView/CategoriesTab/MWMSearchCategoriesManager.mm @@ -2,13 +2,12 @@ #import "AppInfo.h" #import "MWMSearchCategoryCell.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "search/displayed_categories.hpp" #include "base/macros.hpp" -static NSString * const kCellIdentifier = @"MWMSearchCategoryCell"; - @implementation MWMSearchCategoriesManager { vector m_categories; @@ -32,8 +31,7 @@ static NSString * const kCellIdentifier = @"MWMSearchCategoryCell"; tableView.hidden = NO; tableView.delegate = self; tableView.dataSource = self; - [tableView registerNib:[UINib nibWithNibName:kCellIdentifier bundle:nil] - forCellReuseIdentifier:kCellIdentifier]; + [tableView registerWithCellClass:[MWMSearchCategoryCell class]]; [tableView reloadData]; } @@ -47,7 +45,9 @@ static NSString * const kCellIdentifier = @"MWMSearchCategoryCell"; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - auto tCell = static_cast([tableView dequeueReusableCellWithIdentifier:kCellIdentifier]); + auto tCell = static_cast([tableView + dequeueReusableCellWithCellClass:[MWMSearchCategoryCell class] + indexPath:indexPath]); [tCell setCategory:@(m_categories[indexPath.row].c_str())]; return tCell; } diff --git a/iphone/Maps/UI/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm b/iphone/Maps/UI/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm index 3f78db59d6..a531920075 100644 --- a/iphone/Maps/UI/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm +++ b/iphone/Maps/UI/Search/TabbedView/HistoryTab/MWMSearchHistoryManager.mm @@ -7,13 +7,10 @@ #import "MWMSearchNoResults.h" #import "MapsAppDelegate.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "Framework.h" -static NSString * const kRequestCellIdentifier = @"MWMSearchHistoryRequestCell"; -static NSString * const kClearCellIdentifier = @"MWMSearchHistoryClearCell"; -static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPositionCell"; - @interface MWMSearchHistoryManager () @property(weak, nonatomic) MWMSearchTabbedCollectionViewCell * cell; @@ -51,15 +48,10 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition tableView.hidden = NO; tableView.delegate = self; tableView.dataSource = self; - [tableView registerNib:[UINib nibWithNibName:kRequestCellIdentifier bundle:nil] - forCellReuseIdentifier:kRequestCellIdentifier]; - [tableView registerNib:[UINib nibWithNibName:kClearCellIdentifier bundle:nil] - forCellReuseIdentifier:kClearCellIdentifier]; + [tableView registerWithCellClass:[MWMSearchHistoryRequestCell class]]; + [tableView registerWithCellClass:[MWMSearchHistoryClearCell class]]; if (isRouteSearch) - { - [tableView registerNib:[UINib nibWithNibName:kMyPositionCellIdentifier bundle:nil] - forCellReuseIdentifier:kMyPositionCellIdentifier]; - } + [tableView registerWithCellClass:[MWMSearchHistoryMyPositionCell class]]; [tableView reloadData]; } } @@ -98,14 +90,15 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition { if ([self isRequestCell:indexPath]) { - auto tCell = static_cast([tableView dequeueReusableCellWithIdentifier:kRequestCellIdentifier]); + auto tCell = static_cast([tableView + dequeueReusableCellWithCellClass:[MWMSearchHistoryRequestCell class] + indexPath:indexPath]); [tCell config:[self stringAtIndex:indexPath.row]]; return tCell; } - UITableViewCell * cell = [tableView - dequeueReusableCellWithIdentifier:self.isRouteSearchMode ? kMyPositionCellIdentifier - : kClearCellIdentifier]; - return cell; + Class cls = self.isRouteSearchMode ? [MWMSearchHistoryMyPositionCell class] + : [MWMSearchHistoryClearCell class]; + return [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; } #pragma mark - UITableViewDelegate diff --git a/iphone/Maps/UI/Search/TabbedView/MWMSearchTabbedViewController.mm b/iphone/Maps/UI/Search/TabbedView/MWMSearchTabbedViewController.mm index 385997c332..2eedade54b 100644 --- a/iphone/Maps/UI/Search/TabbedView/MWMSearchTabbedViewController.mm +++ b/iphone/Maps/UI/Search/TabbedView/MWMSearchTabbedViewController.mm @@ -6,12 +6,12 @@ #import "MWMSearchTabbedViewLayout.h" #import "MWMSearchTabbedViewProtocol.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "Framework.h" namespace { -NSString * const kCollectionCell = @"MWMSearchTabbedCollectionViewCell"; NSString * const kSelectedButtonTagKey = @"MWMSearchTabbedCollectionViewSelectedButtonTag"; } // namespace @@ -104,8 +104,7 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button) - (void)setupCollectionView { - [self.tablesCollectionView registerNib:[UINib nibWithNibName:kCollectionCell bundle:nil] - forCellWithReuseIdentifier:kCollectionCell]; + [self.tablesCollectionView registerWithCellClass:[MWMSearchTabbedCollectionViewCell class]]; ((MWMSearchTabbedViewLayout *)self.tablesCollectionView.collectionViewLayout).tablesCount = MWMSearchTabbedViewCellCount; } @@ -178,9 +177,9 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button) - (nonnull UICollectionViewCell *)collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { - MWMSearchTabbedCollectionViewCell * cell = - [collectionView dequeueReusableCellWithReuseIdentifier:kCollectionCell - forIndexPath:indexPath]; + auto cell = static_cast([collectionView + dequeueReusableCellWithCellClass:[MWMSearchTabbedCollectionViewCell class] + indexPath:indexPath]); MWMSearchTabbedViewCell cellType = static_cast(indexPath.item); switch (cellType) { diff --git a/iphone/Maps/UI/Search/TableView/MWMSearchTableViewController.mm b/iphone/Maps/UI/Search/TableView/MWMSearchTableViewController.mm index c2d9cf2178..e408db1f13 100644 --- a/iphone/Maps/UI/Search/TableView/MWMSearchTableViewController.mm +++ b/iphone/Maps/UI/Search/TableView/MWMSearchTableViewController.mm @@ -6,33 +6,12 @@ #import "MWMSearchTableView.h" #import "MapsAppDelegate.h" #import "Statistics.h" - -static NSString * const kTableSuggestionCell = @"MWMSearchSuggestionCell"; -static NSString * const kTableCommonCell = @"MWMSearchCommonCell"; - -namespace -{ -typedef NS_ENUM(NSUInteger, MWMSearchTableCellType) { - MWMSearchTableCellTypeSuggestion, - MWMSearchTableCellTypeCommon -}; - -NSString * identifierForType(MWMSearchTableCellType type) -{ - switch (type) - { - case MWMSearchTableCellTypeSuggestion: return kTableSuggestionCell; - case MWMSearchTableCellTypeCommon: return kTableCommonCell; - } -} -} // namespace +#import "SwiftBridge.h" @interface MWMSearchTableViewController () @property(weak, nonatomic) IBOutlet UITableView * tableView; -@property(nonatomic) MWMSearchCommonCell * commonSizingCell; - @property(weak, nonatomic) id delegate; @end @@ -67,19 +46,16 @@ NSString * identifierForType(MWMSearchTableCellType type) UITableView * tableView = self.tableView; tableView.estimatedRowHeight = 80.; tableView.rowHeight = UITableViewAutomaticDimension; - - [tableView registerNib:[UINib nibWithNibName:kTableSuggestionCell bundle:nil] - forCellReuseIdentifier:kTableSuggestionCell]; - [tableView registerNib:[UINib nibWithNibName:kTableCommonCell bundle:nil] - forCellReuseIdentifier:kTableCommonCell]; + [tableView registerWithCellClass:[MWMSearchSuggestionCell class]]; + [tableView registerWithCellClass:[MWMSearchCommonCell class]]; } -- (MWMSearchTableCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { size_t const numSuggests = [MWMSearch suggestionsCount]; if (numSuggests > 0 && indexPath.row < numSuggests) - return MWMSearchTableCellTypeSuggestion; - return MWMSearchTableCellTypeCommon; + return [MWMSearchSuggestionCell class]; + return [MWMSearchCommonCell class]; } - (search::Result const &)searchResultForIndexPath:(NSIndexPath *)indexPath @@ -110,49 +86,37 @@ NSString * identifierForType(MWMSearchTableCellType type) - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - MWMSearchTableCellType const cellType = [self cellTypeForIndexPath:indexPath]; - UITableViewCell * cell = - [tableView dequeueReusableCellWithIdentifier:identifierForType(cellType)]; - switch (cellType) + Class cls = [self cellClassForIndexPath:indexPath]; + auto cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; + if (cls == [MWMSearchSuggestionCell class]) { - case MWMSearchTableCellTypeSuggestion: - [self configSuggestionCell:(MWMSearchSuggestionCell *)cell - result:[self searchResultForIndexPath:indexPath] - isLastCell:indexPath.row == [MWMSearch suggestionsCount] - 1]; - break; - case MWMSearchTableCellTypeCommon: - [(MWMSearchCommonCell *)cell config:[self searchResultForIndexPath:indexPath]]; - break; + auto tCell = static_cast(cell); + [tCell config:[self searchResultForIndexPath:indexPath]]; + tCell.isLastCell = indexPath.row == [MWMSearch suggestionsCount] - 1; + } + else if (cls == [MWMSearchCommonCell class]) + { + auto tCell = static_cast(cell); + [tCell config:[self searchResultForIndexPath:indexPath]]; } - return cell; } -#pragma mark - Config cells - -- (void)configSuggestionCell:(MWMSearchSuggestionCell *)cell - result:(search::Result const &)result - isLastCell:(BOOL)isLastCell -{ - [cell config:result]; - cell.isLastCell = isLastCell; -} - #pragma mark - UITableViewDelegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - MWMSearchTableCellType cellType = [self cellTypeForIndexPath:indexPath]; + Class cls = [self cellClassForIndexPath:indexPath]; id delegate = self.delegate; search::Result const & result = [self searchResultForIndexPath:indexPath]; - if (cellType == MWMSearchTableCellTypeSuggestion) + if (cls == [MWMSearchSuggestionCell class]) { NSString * suggestionString = @(result.GetSuggestionString()); [Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult) withParameters:@{kStatValue : suggestionString, kStatScreen : kStatSearch}]; [delegate searchText:suggestionString forInputLocale:nil]; } - else + else if (cls == [MWMSearchCommonCell class]) { MWMSearchTextField * textField = delegate.searchTextField; [MWMSearch saveQuery:textField.text forInputLocale:textField.textInputMode.primaryLanguage]; @@ -174,17 +138,7 @@ NSString * identifierForType(MWMSearchTableCellType type) if (!IPAD && [MWMSearch isSearchOnMap]) return; - self.commonSizingCell = nil; [self reloadData]; } -#pragma mark - Properties - -- (MWMSearchCommonCell *)commonSizingCell -{ - if (!_commonSizingCell) - _commonSizingCell = [self.tableView dequeueReusableCellWithIdentifier:kTableCommonCell]; - return _commonSizingCell; -} - @end From 55936089e11ab90f28f1df6cd05bec6ff7ced6d3 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:25:22 +0300 Subject: [PATCH 06/13] [cleanup] [ios] Place page code cleanup. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 58 ++++++----- .../MWMOpeningHoursLayoutHelper.mm | 96 ++++++++++--------- .../RegularCell/MWMPlacePageInfoCell.h | 13 --- ...eInfoCell.xib => MWMPlacePageInfoCell.xib} | 31 +++--- ...eLinkCell.xib => MWMPlacePageLinkCell.xib} | 13 ++- .../RegularCell/MWMPlacePageRegularCell.h | 18 ++++ ...InfoCell.mm => MWMPlacePageRegularCell.mm} | 12 ++- .../PlacePageLayout/MWMPlacePageLayout.mm | 55 +++++------ .../Preview/MWMPPPreviewLayoutHelper.mm | 25 ++--- 9 files changed, 175 insertions(+), 146 deletions(-) delete mode 100644 iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.h rename iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/{PlacePageInfoCell.xib => MWMPlacePageInfoCell.xib} (83%) rename iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/{PlacePageLinkCell.xib => MWMPlacePageLinkCell.xib} (88%) create mode 100644 iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.h rename iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/{MWMPlacePageInfoCell.mm => MWMPlacePageRegularCell.mm} (96%) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 393cca9edc..69be704b3a 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -1107,15 +1107,15 @@ F6E2FE841E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC01E097B9F0083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib */; }; F6E2FE851E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC01E097B9F0083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib */; }; F6E2FE861E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC01E097B9F0083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib */; }; - F6E2FE871E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageInfoCell.mm */; }; - F6E2FE881E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageInfoCell.mm */; }; - F6E2FE891E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageInfoCell.mm */; }; - F6E2FE8A1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* PlacePageInfoCell.xib */; }; - F6E2FE8B1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* PlacePageInfoCell.xib */; }; - F6E2FE8C1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* PlacePageInfoCell.xib */; }; - F6E2FE8D1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* PlacePageLinkCell.xib */; }; - F6E2FE8E1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* PlacePageLinkCell.xib */; }; - F6E2FE8F1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* PlacePageLinkCell.xib */; }; + F6E2FE871E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageRegularCell.mm */; }; + F6E2FE881E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageRegularCell.mm */; }; + F6E2FE891E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC31E097B9F0083EBEC /* MWMPlacePageRegularCell.mm */; }; + F6E2FE8A1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* MWMPlacePageInfoCell.xib */; }; + F6E2FE8B1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* MWMPlacePageInfoCell.xib */; }; + F6E2FE8C1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC41E097B9F0083EBEC /* MWMPlacePageInfoCell.xib */; }; + F6E2FE8D1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* MWMPlacePageLinkCell.xib */; }; + F6E2FE8E1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* MWMPlacePageLinkCell.xib */; }; + F6E2FE8F1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FCC51E097B9F0083EBEC /* MWMPlacePageLinkCell.xib */; }; F6E2FE901E097BA00083EBEC /* MWMPlacePageTaxiCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC81E097B9F0083EBEC /* MWMPlacePageTaxiCell.mm */; }; F6E2FE911E097BA00083EBEC /* MWMPlacePageTaxiCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC81E097B9F0083EBEC /* MWMPlacePageTaxiCell.mm */; }; F6E2FE921E097BA00083EBEC /* MWMPlacePageTaxiCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FCC81E097B9F0083EBEC /* MWMPlacePageTaxiCell.mm */; }; @@ -2018,17 +2018,17 @@ F6E2FCB71E097B9F0083EBEC /* MWMOpeningHours.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMOpeningHours.mm; sourceTree = ""; }; F6E2FCB81E097B9F0083EBEC /* MWMOpeningHoursCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMOpeningHoursCell.xib; sourceTree = ""; }; F6E2FCB91E097B9F0083EBEC /* MWMOpeningHoursLayoutHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMOpeningHoursLayoutHelper.h; sourceTree = ""; }; - F6E2FCBA1E097B9F0083EBEC /* MWMOpeningHoursLayoutHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMOpeningHoursLayoutHelper.mm; sourceTree = ""; }; + F6E2FCBA1E097B9F0083EBEC /* MWMOpeningHoursLayoutHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMOpeningHoursLayoutHelper.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FCBB1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageOpeningHoursCell.h; sourceTree = ""; }; F6E2FCBC1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageOpeningHoursCell.mm; sourceTree = ""; }; F6E2FCBD1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageOpeningHoursCell.xib; sourceTree = ""; }; F6E2FCBE1E097B9F0083EBEC /* MWMPlacePageOpeningHoursDayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageOpeningHoursDayView.h; sourceTree = ""; }; F6E2FCBF1E097B9F0083EBEC /* MWMPlacePageOpeningHoursDayView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageOpeningHoursDayView.mm; sourceTree = ""; }; F6E2FCC01E097B9F0083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageOpeningHoursWeekDayView.xib; sourceTree = ""; }; - F6E2FCC21E097B9F0083EBEC /* MWMPlacePageInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageInfoCell.h; sourceTree = ""; }; - F6E2FCC31E097B9F0083EBEC /* MWMPlacePageInfoCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageInfoCell.mm; sourceTree = ""; }; - F6E2FCC41E097B9F0083EBEC /* PlacePageInfoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlacePageInfoCell.xib; sourceTree = ""; }; - F6E2FCC51E097B9F0083EBEC /* PlacePageLinkCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlacePageLinkCell.xib; sourceTree = ""; }; + F6E2FCC21E097B9F0083EBEC /* MWMPlacePageRegularCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageRegularCell.h; sourceTree = ""; }; + F6E2FCC31E097B9F0083EBEC /* MWMPlacePageRegularCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageRegularCell.mm; sourceTree = ""; }; + F6E2FCC41E097B9F0083EBEC /* MWMPlacePageInfoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageInfoCell.xib; sourceTree = ""; }; + F6E2FCC51E097B9F0083EBEC /* MWMPlacePageLinkCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageLinkCell.xib; sourceTree = ""; }; F6E2FCC71E097B9F0083EBEC /* MWMPlacePageTaxiCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageTaxiCell.h; sourceTree = ""; }; F6E2FCC81E097B9F0083EBEC /* MWMPlacePageTaxiCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageTaxiCell.mm; sourceTree = ""; }; F6E2FCC91E097B9F0083EBEC /* MWMPlacePageTaxiCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageTaxiCell.xib; sourceTree = ""; }; @@ -2052,7 +2052,7 @@ F6E2FCDD1E097B9F0083EBEC /* _MWMPPPSubtitle.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = _MWMPPPSubtitle.xib; sourceTree = ""; }; F6E2FCDE1E097B9F0083EBEC /* _MWMPPPTitle.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = _MWMPPPTitle.xib; sourceTree = ""; }; F6E2FCDF1E097B9F0083EBEC /* MWMPPPreviewLayoutHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPPPreviewLayoutHelper.h; sourceTree = ""; }; - F6E2FCE01E097B9F0083EBEC /* MWMPPPreviewLayoutHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPPPreviewLayoutHelper.mm; sourceTree = ""; }; + F6E2FCE01E097B9F0083EBEC /* MWMPPPreviewLayoutHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPPPreviewLayoutHelper.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FCE31E097B9F0083EBEC /* MWMConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMConsole.h; sourceTree = ""; }; F6E2FCE41E097B9F0083EBEC /* MWMConsole.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMConsole.mm; sourceTree = ""; }; F6E2FCE61E097B9F0083EBEC /* MWMSearchFilterPresentationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterPresentationController.h; sourceTree = ""; }; @@ -3622,10 +3622,10 @@ F6E2FCC11E097B9F0083EBEC /* RegularCell */ = { isa = PBXGroup; children = ( - F6E2FCC21E097B9F0083EBEC /* MWMPlacePageInfoCell.h */, - F6E2FCC31E097B9F0083EBEC /* MWMPlacePageInfoCell.mm */, - F6E2FCC41E097B9F0083EBEC /* PlacePageInfoCell.xib */, - F6E2FCC51E097B9F0083EBEC /* PlacePageLinkCell.xib */, + F6E2FCC21E097B9F0083EBEC /* MWMPlacePageRegularCell.h */, + F6E2FCC31E097B9F0083EBEC /* MWMPlacePageRegularCell.mm */, + F6E2FCC41E097B9F0083EBEC /* MWMPlacePageInfoCell.xib */, + F6E2FCC51E097B9F0083EBEC /* MWMPlacePageLinkCell.xib */, ); path = RegularCell; sourceTree = ""; @@ -4104,7 +4104,7 @@ EE583CBB12F773F00042CBE3 /* unicode_blocks.txt in Resources */, F6E2FDDC1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */, 340E1EF41E2F614400CE49BF /* SearchFilters.storyboard in Resources */, - F6E2FE8A1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */, + F6E2FE8A1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */, EEFE7C1412F8C9E1006AF8C3 /* fonts_blacklist.txt in Resources */, F68FCB8C1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */, F6E2FD581E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */, @@ -4168,8 +4168,7 @@ F6E2FE6F1E097BA00083EBEC /* _MWMOHSubCell.xib in Resources */, F6172FA51BBD5A3E0081D325 /* MWMiPadRoutePreview.xib in Resources */, 97A5967F19B9CD47007A963F /* copyright.html in Resources */, - F6E2FDAF1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, - F6E2FE8D1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */, + F6E2FE8D1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */, F6E2FD671E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */, 671182E31C7F0DD400CB8177 /* WorldCoasts_obsolete.mwm in Resources */, 3463BA681DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */, @@ -4314,7 +4313,7 @@ 6741A95C1BF340DE002C974C /* categories.txt in Resources */, 6741A95D1BF340DE002C974C /* types.txt in Resources */, F6E2FF1B1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */, - F6E2FE8E1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */, + F6E2FE8E1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */, F6E2FDFB1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */, 6741A9601BF340DE002C974C /* MWMRoutingDisclaimerAlert.xib in Resources */, F6E2FE761E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */, @@ -4379,8 +4378,7 @@ F6E2FD591E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */, F6E2FE521E097BA00083EBEC /* MWMActionBarButton.xib in Resources */, 349D1AE11E2E325C004A2006 /* MWMBottomMenuViewController.xib in Resources */, - F6E2FDD11E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */, - F6E2FE8B1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */, + F6E2FE8B1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */, F6E2FD741E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */, F64D9CA31C899C760063FA30 /* MWMEditorViralAlert.xib in Resources */, F6E2FEA91E097BA00083EBEC /* _MWMPPPAddress.xib in Resources */, @@ -4437,7 +4435,7 @@ 849CF5FE1DE842290024A8A5 /* MWMDefaultAlert.xib in Resources */, 849CF5FF1DE842290024A8A5 /* fonts_whitelist.txt in Resources */, F6E2FDF61E097BA00083EBEC /* MWMOpeningHoursAddScheduleTableViewCell.xib in Resources */, - F6E2FE8C1E097BA00083EBEC /* PlacePageInfoCell.xib in Resources */, + F6E2FE8C1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */, 849CF6011DE842290024A8A5 /* MWMDownloaderDialogHeader.xib in Resources */, F6E2FF431E097BA00083EBEC /* MWMSearchTableViewController.xib in Resources */, 849CF6021DE842290024A8A5 /* World.mwm in Resources */, @@ -4506,7 +4504,7 @@ 849CF6471DE842290024A8A5 /* MWMSideButtonsView.xib in Resources */, 849CF64A1DE842290024A8A5 /* editor.config in Resources */, F6E2FEBC1E097BA00083EBEC /* _MWMPPPTitle.xib in Resources */, - F6E2FE8F1E097BA00083EBEC /* PlacePageLinkCell.xib in Resources */, + F6E2FE8F1E097BA00083EBEC /* MWMPlacePageLinkCell.xib in Resources */, 34F73FA41E08300E00AC1FD6 /* Images.xcassets in Resources */, 849CF64C1DE842290024A8A5 /* synonyms.txt in Resources */, F6E2FF071E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */, @@ -4758,7 +4756,7 @@ F6FEA82D1C58E89B007223CC /* MWMButton.mm in Sources */, F6E2FE3C1E097BA00083EBEC /* MWMMigrationViewController.mm in Sources */, F6E2FD4F1E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, - F6E2FE871E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, + F6E2FE871E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */, 34D3AFE91E378AF1004100F9 /* UINib+Init.swift in Sources */, F6E2FD7F1E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, F6BD33871B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm in Sources */, @@ -5012,7 +5010,7 @@ 340475591E081A4600C92850 /* WebViewController.mm in Sources */, F6E2FE3D1E097BA00083EBEC /* MWMMigrationViewController.mm in Sources */, F6E2FD501E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, - F6E2FE881E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, + F6E2FE881E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */, F6E2FD801E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, 34D3AFEA1E378AF1004100F9 /* UINib+Init.swift in Sources */, 6741A9F11BF340DE002C974C /* MWMNavigationDashboardEntity.mm in Sources */, @@ -5268,7 +5266,7 @@ 849CF6E91DE842290024A8A5 /* MWMCircularProgressView.mm in Sources */, F6E2FE3E1E097BA00083EBEC /* MWMMigrationViewController.mm in Sources */, F6E2FD511E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.mm in Sources */, - F6E2FE891E097BA00083EBEC /* MWMPlacePageInfoCell.mm in Sources */, + F6E2FE891E097BA00083EBEC /* MWMPlacePageRegularCell.mm in Sources */, 34D3AFEB1E378AF1004100F9 /* UINib+Init.swift in Sources */, F6E2FD811E097BA00083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.mm in Sources */, 849CF6EB1DE842290024A8A5 /* MWMAPIBar.mm in Sources */, diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/OpeningHoursCell/MWMOpeningHoursLayoutHelper.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/OpeningHoursCell/MWMOpeningHoursLayoutHelper.mm index e797b2325b..a60a0feb19 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/OpeningHoursCell/MWMOpeningHoursLayoutHelper.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/OpeningHoursCell/MWMOpeningHoursLayoutHelper.mm @@ -3,50 +3,10 @@ #import "MWMOpeningHours.h" #import "MWMPlacePageData.h" #import "MWMTableViewCell.h" +#import "SwiftBridge.h" #include "std/array.hpp" -namespace -{ -array const kCells = {{@"_MWMOHHeaderCell", @"_MWMOHSubCell"}}; - -NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) -{ - auto const richString = ^NSMutableAttributedString * (NSString * str, UIFont * font, UIColor * color) - { - return [[NSMutableAttributedString alloc] initWithString:str - attributes:@{NSFontAttributeName : font, - NSForegroundColorAttributeName : color}]; - }; - - auto str = richString(day.TodayTime(), [UIFont regular17], day.m_isOpen ? [UIColor blackPrimaryText] : - [UIColor red]); - if (day.m_isOpen) - { - auto lineBreak = [[NSAttributedString alloc] initWithString:@"\n"]; - - if (day.m_breaks.length) - { - [str appendAttributedString:lineBreak]; - [str appendAttributedString:richString(day.m_breaks, [UIFont regular13], [UIColor blackSecondaryText])]; - } - - if (isClosedNow) - { - [str appendAttributedString:lineBreak]; - [str appendAttributedString:richString(L(@"closed_now"), [UIFont regular13], [UIColor red])]; - } - - auto paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - paragraphStyle.lineSpacing = 4; - - [str addAttributes:@{NSParagraphStyleAttributeName : paragraphStyle} range:{0, str.length}]; - } - return str; -} - -} // namespace - @interface MWMPlacePageData() - (vector &)mutableMetainfoRows; @@ -97,6 +57,48 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) @end +namespace +{ +array const kCells = {{[_MWMOHHeaderCell class], [_MWMOHSubCell class]}}; + +NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) +{ + auto const richString = + ^NSMutableAttributedString *(NSString * str, UIFont * font, UIColor * color) + { + return [[NSMutableAttributedString alloc] + initWithString:str + attributes:@{NSFontAttributeName : font, NSForegroundColorAttributeName : color}]; + }; + + auto str = richString(day.TodayTime(), [UIFont regular17], + day.m_isOpen ? [UIColor blackPrimaryText] : [UIColor red]); + if (day.m_isOpen) + { + auto lineBreak = [[NSAttributedString alloc] initWithString:@"\n"]; + + if (day.m_breaks.length) + { + [str appendAttributedString:lineBreak]; + [str appendAttributedString:richString(day.m_breaks, [UIFont regular13], + [UIColor blackSecondaryText])]; + } + + if (isClosedNow) + { + [str appendAttributedString:lineBreak]; + [str appendAttributedString:richString(L(@"closed_now"), [UIFont regular13], [UIColor red])]; + } + + auto paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + paragraphStyle.lineSpacing = 4; + + [str addAttributes:@{ NSParagraphStyleAttributeName : paragraphStyle } range:{0, str.length}]; + } + return str; +} + +} // namespace @interface MWMOpeningHoursLayoutHelper() { @@ -127,8 +129,8 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) - (void)registerCells { - for (auto name : kCells) - [self.tableView registerNib:[UINib nibWithNibName:name bundle:nil] forCellReuseIdentifier:name]; + for (Class cls : kCells) + [self.tableView registerWithCellClass:cls]; } - (void)configWithData:(MWMPlacePageData *)data @@ -146,7 +148,9 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) if (self.data.metainfoRows[indexPath.row] == place_page::MetainfoRows::OpeningHours) { - _MWMOHHeaderCell * cell = [tableView dequeueReusableCellWithIdentifier:[_MWMOHHeaderCell className]]; + Class cls = [_MWMOHHeaderCell class]; + auto cell = static_cast<_MWMOHHeaderCell *>( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); if (m_days.size() > 1) { @@ -189,7 +193,9 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow) } else { - _MWMOHSubCell * cell = [tableView dequeueReusableCellWithIdentifier:[_MWMOHSubCell className]]; + Class cls = [_MWMOHSubCell class]; + auto cell = static_cast<_MWMOHSubCell *>( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); cell.days.text = day.m_workingDays; cell.schedule.text = day.m_workingTimes ?: L(@"closed"); cell.breaks.text = day.m_breaks; diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.h b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.h deleted file mode 100644 index 576b5e1b17..0000000000 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.h +++ /dev/null @@ -1,13 +0,0 @@ -#import "MWMTableViewCell.h" - -#import "MWMPlacePageData.h" - -@interface MWMPlacePageInfoCell : MWMTableViewCell - -- (void)configWithRow:(place_page::MetainfoRows)row - data:(MWMPlacePageData *)data; - -@property(weak, nonatomic, readonly) IBOutlet UIImageView * icon; -@property(weak, nonatomic, readonly) IBOutlet id textContainer; - -@end diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageInfoCell.xib b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.xib similarity index 83% rename from iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageInfoCell.xib rename to iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.xib index 55322599ac..6320acce64 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageInfoCell.xib +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.xib @@ -1,13 +1,17 @@ - - + + + + + - + + - + @@ -25,14 +29,14 @@ - + @@ -95,4 +99,9 @@ + + + + + diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageLinkCell.xib b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageLinkCell.xib similarity index 88% rename from iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageLinkCell.xib rename to iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageLinkCell.xib index 7f38c6bcef..183eab2414 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/PlacePageLinkCell.xib +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageLinkCell.xib @@ -1,21 +1,25 @@ - + + + + - + - + - + + @@ -25,6 +29,7 @@ + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.h b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.h new file mode 100644 index 0000000000..68473e7c12 --- /dev/null +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.h @@ -0,0 +1,18 @@ +#import "MWMTableViewCell.h" + +#import "MWMPlacePageData.h" + +@interface MWMPlacePageRegularCell : MWMTableViewCell + +- (void)configWithRow:(place_page::MetainfoRows)row data:(MWMPlacePageData *)data; + +@property(weak, nonatomic, readonly) IBOutlet UIImageView * icon; +@property(weak, nonatomic, readonly) IBOutlet id textContainer; + +@end + +@interface MWMPlacePageInfoCell : MWMPlacePageRegularCell +@end + +@interface MWMPlacePageLinkCell : MWMPlacePageRegularCell +@end diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.mm similarity index 96% rename from iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.mm rename to iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.mm index eae985b86a..6397da5b26 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageInfoCell.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Content/RegularCell/MWMPlacePageRegularCell.mm @@ -1,4 +1,4 @@ -#import "MWMPlacePageInfoCell.h" +#import "MWMPlacePageRegularCell.h" #import "MWMCommon.h" #import "MapViewController.h" #import "MapsAppDelegate.h" @@ -8,7 +8,7 @@ #include "platform/measurement_utils.hpp" #include "platform/settings.hpp" -@interface MWMPlacePageInfoCell () +@interface MWMPlacePageRegularCell () @property(weak, nonatomic, readwrite) IBOutlet UIImageView * icon; @property(weak, nonatomic, readwrite) IBOutlet id textContainer; @@ -21,7 +21,7 @@ @end -@implementation MWMPlacePageInfoCell +@implementation MWMPlacePageRegularCell - (void)awakeFromNib { @@ -172,3 +172,9 @@ } @end + +@implementation MWMPlacePageInfoCell +@end + +@implementation MWMPlacePageLinkCell +@end diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm index 42e6a2fb17..d756359c77 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm @@ -6,8 +6,8 @@ #import "MWMPlacePageButtonCell.h" #import "MWMPlacePageCellUpdateProtocol.h" #import "MWMPlacePageData.h" -#import "MWMPlacePageInfoCell.h" #import "MWMPlacePageLayoutImpl.h" +#import "MWMPlacePageRegularCell.h" #import "MWMPlacePageTaxiCell.h" #import "MWMiPadPlacePageLayoutImpl.h" #import "MWMiPhonePlacePageLayoutImpl.h" @@ -20,23 +20,18 @@ namespace { -array const kBookmarkCells = {{@"MWMBookmarkCell"}}; - using place_page::MetainfoRows; -map const kMetaInfoCells = { - {MetainfoRows::Website, @"PlacePageLinkCell"}, - {MetainfoRows::Address, @"PlacePageInfoCell"}, - {MetainfoRows::Email, @"PlacePageLinkCell"}, - {MetainfoRows::Phone, @"PlacePageLinkCell"}, - {MetainfoRows::Cuisine, @"PlacePageInfoCell"}, - {MetainfoRows::Operator, @"PlacePageInfoCell"}, - {MetainfoRows::Coordinate, @"PlacePageInfoCell"}, - {MetainfoRows::Internet, @"PlacePageInfoCell"}, - {MetainfoRows::Taxi, @"MWMPlacePageTaxiCell"}}; - -array const kButtonsCells = {{@"MWMPlacePageButtonCell"}}; - +map const kMetaInfoCells = { + {MetainfoRows::Website, [MWMPlacePageLinkCell class]}, + {MetainfoRows::Address, [MWMPlacePageInfoCell class]}, + {MetainfoRows::Email, [MWMPlacePageLinkCell class]}, + {MetainfoRows::Phone, [MWMPlacePageLinkCell class]}, + {MetainfoRows::Cuisine, [MWMPlacePageInfoCell class]}, + {MetainfoRows::Operator, [MWMPlacePageInfoCell class]}, + {MetainfoRows::Coordinate, [MWMPlacePageInfoCell class]}, + {MetainfoRows::Internet, [MWMPlacePageInfoCell class]}, + {MetainfoRows::Taxi, [MWMPlacePageTaxiCell class]}}; } // namespace @interface MWMPlacePageLayout () const kButtonsCells = {{@"MWMPlacePageButtonCell"}}; - (void)registerCells { auto tv = self.placePageView.tableView; - - [tv registerNib:[UINib nibWithNibName:kButtonsCells[0] bundle:nil] - forCellReuseIdentifier:kButtonsCells[0]]; - [tv registerNib:[UINib nibWithNibName:kBookmarkCells[0] bundle:nil] - forCellReuseIdentifier:kBookmarkCells[0]]; + [tv registerWithCellClass:[MWMPlacePageButtonCell class]]; + [tv registerWithCellClass:[MWMBookmarkCell class]]; // Register all meta info cells. for (auto const & pair : kMetaInfoCells) - { - NSString * name = pair.second; - [tv registerNib:[UINib nibWithNibName:name bundle:nil] forCellReuseIdentifier:name]; - } + [tv registerWithCellClass:pair.second]; } - (void)layoutWithSize:(CGSize const &)size @@ -314,7 +303,9 @@ array const kButtonsCells = {{@"MWMPlacePageButtonCell"}}; } case Sections::Bookmark: { - MWMBookmarkCell * c = [tableView dequeueReusableCellWithIdentifier:kBookmarkCells[0]]; + Class cls = [MWMBookmarkCell class]; + auto c = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [c configureWithText:data.bookmarkDescription updateCellDelegate:self editBookmarkDelegate:delegate @@ -338,13 +329,17 @@ array const kButtonsCells = {{@"MWMPlacePageButtonCell"}}; case MetainfoRows::Internet: case MetainfoRows::Coordinate: { - MWMPlacePageInfoCell * c = [tableView dequeueReusableCellWithIdentifier:kMetaInfoCells.at(row)]; + Class cls = kMetaInfoCells.at(row); + auto c = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [c configWithRow:row data:data]; return c; } case MetainfoRows::Taxi: { - MWMPlacePageTaxiCell * c = [tableView dequeueReusableCellWithIdentifier:kMetaInfoCells.at(row)]; + Class cls = kMetaInfoCells.at(row); + auto c = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); c.delegate = delegate; return c; } @@ -352,7 +347,9 @@ array const kButtonsCells = {{@"MWMPlacePageButtonCell"}}; } case Sections::Buttons: { - MWMPlacePageButtonCell * c = [tableView dequeueReusableCellWithIdentifier:kButtonsCells[0]]; + Class cls = [MWMPlacePageButtonCell class]; + auto c = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); auto const row = data.buttonsRows[indexPath.row]; [c configForRow:row withDelegate:delegate]; diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm index 0496a6f3e1..43959a7f64 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm @@ -1,19 +1,14 @@ #import "MWMPPPreviewLayoutHelper.h" #import "MWMCommon.h" #import "MWMDirectionView.h" -#import "MWMPlacePageData.h" #import "MWMPPPreviewBannerCell.h" +#import "MWMPlacePageData.h" #import "MWMTableViewCell.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "std/array.hpp" -namespace -{ -array const kPreviewCells = {{@"_MWMPPPTitle", @"_MWMPPPExternalTitle", @"_MWMPPPSubtitle", - @"_MWMPPPSchedule", @"_MWMPPPBooking", @"_MWMPPPAddress", @"_MWMPPPSpace", @"MWMPPPreviewBannerCell"}}; -} // namespace - #pragma mark - Base // Base class for avoiding copy-paste in inheriting cells. @interface _MWMPPPCellBase : MWMTableViewCell @@ -125,6 +120,14 @@ array const kPreviewCells = {{@"_MWMPPPTitle", @"_MWMPPPExternalT @implementation _MWMPPPSpace @end +namespace +{ +array const kPreviewCells = {{[_MWMPPPTitle class], [_MWMPPPExternalTitle class], + [_MWMPPPSubtitle class], [_MWMPPPSchedule class], + [_MWMPPPBooking class], [_MWMPPPAddress class], + [_MWMPPPSpace class], [MWMPPPreviewBannerCell class]}}; +} // namespace + @interface MWMPPPreviewLayoutHelper () @property(weak, nonatomic) UITableView * tableView; @@ -160,8 +163,8 @@ array const kPreviewCells = {{@"_MWMPPPTitle", @"_MWMPPPExternalT - (void)registerCells { - for (auto name : kPreviewCells) - [self.tableView registerNib:[UINib nibWithNibName:name bundle:nil] forCellReuseIdentifier:name]; + for (Class cls : kPreviewCells) + [self.tableView registerWithCellClass:cls]; } - (void)configWithData:(MWMPlacePageData *)data @@ -180,9 +183,9 @@ array const kPreviewCells = {{@"_MWMPPPTitle", @"_MWMPPPExternalT using namespace place_page; auto tableView = self.tableView; auto const row = data.previewRows[indexPath.row]; - auto cellName = kPreviewCells[static_cast(row)]; + Class cls = kPreviewCells[static_cast(row)]; - auto * c = [tableView dequeueReusableCellWithIdentifier:cellName]; + auto * c = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; switch(row) { case PreviewRows::Title: From 62003ecec3e99037ccd9e9c4bdd7bd7706de44d6 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:25:38 +0300 Subject: [PATCH 07/13] [cleanup] [ios] Editor code cleanup. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 321 ++++++++++-------- .../MWMBookmarkColorViewController.mm | 4 +- .../EditBookmark/MWMEditBookmarkController.mm | 32 +- ...ditionalNamePlaceholderTableViewCell.swift | 3 + .../UI/Editor/{ => Cells}/MWMButtonCell.h | 2 +- .../UI/Editor/{ => Cells}/MWMButtonCell.mm | 10 +- .../UI/Editor/{ => Cells}/MWMButtonCell.xib | 0 .../MWMEditorAddAdditionalNameTableViewCell.h | 0 ...MWMEditorAddAdditionalNameTableViewCell.mm | 14 +- ...WMEditorAddAdditionalNameTableViewCell.xib | 0 ...AdditionalNamePlaceholderTableViewCell.xib | 20 +- .../MWMEditorAdditionalNameTableViewCell.h | 2 +- .../MWMEditorAdditionalNameTableViewCell.mm | 16 +- .../MWMEditorAdditionalNameTableViewCell.xib | 0 .../{ => Cells}/MWMEditorCategoryCell.h | 4 +- .../{ => Cells}/MWMEditorCategoryCell.mm | 16 +- .../{ => Cells}/MWMEditorCategoryCell.xib | 0 .../MWMEditorSelectTableViewCell.h | 0 .../MWMEditorSelectTableViewCell.mm | 0 .../MWMEditorSelectTableViewCell.xib | 0 .../MWMEditorSwitchTableViewCell.h | 0 .../MWMEditorSwitchTableViewCell.mm | 8 +- .../MWMEditorSwitchTableViewCell.xib | 0 .../{ => Cells}/MWMEditorTextTableViewCell.h | 2 +- .../{ => Cells}/MWMEditorTextTableViewCell.mm | 45 ++- .../MWMEditorTextTableViewCell.xib | 0 .../Maps/UI/Editor/{ => Cells}/MWMNoteCell.h | 5 +- .../Maps/UI/Editor/{ => Cells}/MWMNoteCell.mm | 47 +-- .../UI/Editor/{ => Cells}/MWMNoteCell.xib | 0 .../Cuisine/MWMCuisineEditorViewController.mm | 5 +- .../Maps/UI/Editor/MWMEditorViewController.mm | 80 ++--- .../MWMObjectsCategorySelectorController.mm | 5 +- .../MWMOpeningHoursEditorViewController.mm | 41 ++- .../OpeningHours/MWMOpeningHoursSection.mm | 5 +- .../Street/MWMStreetEditorViewController.mm | 26 +- 35 files changed, 362 insertions(+), 351 deletions(-) create mode 100644 iphone/Maps/UI/Editor/Cells/EditorAdditionalNamePlaceholderTableViewCell.swift rename iphone/Maps/UI/Editor/{ => Cells}/MWMButtonCell.h (83%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMButtonCell.mm (60%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMButtonCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAddAdditionalNameTableViewCell.h (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAddAdditionalNameTableViewCell.mm (56%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAddAdditionalNameTableViewCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAdditionalNamePlaceholderTableViewCell.xib (75%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAdditionalNameTableViewCell.h (90%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAdditionalNameTableViewCell.mm (70%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorAdditionalNameTableViewCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorCategoryCell.h (65%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorCategoryCell.mm (64%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorCategoryCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSelectTableViewCell.h (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSelectTableViewCell.mm (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSelectTableViewCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSwitchTableViewCell.h (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSwitchTableViewCell.mm (78%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorSwitchTableViewCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorTextTableViewCell.h (92%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorTextTableViewCell.mm (65%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMEditorTextTableViewCell.xib (100%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMNoteCell.h (76%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMNoteCell.mm (64%) rename iphone/Maps/UI/Editor/{ => Cells}/MWMNoteCell.xib (100%) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 69be704b3a..f9c645b4b5 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -336,6 +336,60 @@ 34D3AFF51E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; 34D3AFF61E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; 34D3AFF71E37A36A004100F9 /* UICollectionView+Cells.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */; }; + 34D3B0171E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFD1E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift */; }; + 34D3B0181E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFD1E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift */; }; + 34D3B0191E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFD1E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift */; }; + 34D3B01A1E389D05004100F9 /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFF1E389D05004100F9 /* MWMButtonCell.mm */; }; + 34D3B01B1E389D05004100F9 /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFF1E389D05004100F9 /* MWMButtonCell.mm */; }; + 34D3B01C1E389D05004100F9 /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3AFFF1E389D05004100F9 /* MWMButtonCell.mm */; }; + 34D3B01D1E389D05004100F9 /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0001E389D05004100F9 /* MWMButtonCell.xib */; }; + 34D3B01E1E389D05004100F9 /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0001E389D05004100F9 /* MWMButtonCell.xib */; }; + 34D3B01F1E389D05004100F9 /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0001E389D05004100F9 /* MWMButtonCell.xib */; }; + 34D3B0201E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0021E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; + 34D3B0211E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0021E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; + 34D3B0221E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0021E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; + 34D3B0231E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0031E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; + 34D3B0241E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0031E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; + 34D3B0251E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0031E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; + 34D3B0261E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0041E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; + 34D3B0271E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0041E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; + 34D3B0281E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0041E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; + 34D3B0291E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0061E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm */; }; + 34D3B02A1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0061E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm */; }; + 34D3B02B1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0061E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm */; }; + 34D3B02C1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0071E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib */; }; + 34D3B02D1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0071E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib */; }; + 34D3B02E1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0071E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib */; }; + 34D3B02F1E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0091E389D05004100F9 /* MWMEditorCategoryCell.mm */; }; + 34D3B0301E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0091E389D05004100F9 /* MWMEditorCategoryCell.mm */; }; + 34D3B0311E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0091E389D05004100F9 /* MWMEditorCategoryCell.mm */; }; + 34D3B0321E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00A1E389D05004100F9 /* MWMEditorCategoryCell.xib */; }; + 34D3B0331E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00A1E389D05004100F9 /* MWMEditorCategoryCell.xib */; }; + 34D3B0341E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00A1E389D05004100F9 /* MWMEditorCategoryCell.xib */; }; + 34D3B0351E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00C1E389D05004100F9 /* MWMEditorSelectTableViewCell.mm */; }; + 34D3B0361E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00C1E389D05004100F9 /* MWMEditorSelectTableViewCell.mm */; }; + 34D3B0371E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00C1E389D05004100F9 /* MWMEditorSelectTableViewCell.mm */; }; + 34D3B0381E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00D1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib */; }; + 34D3B0391E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00D1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib */; }; + 34D3B03A1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B00D1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib */; }; + 34D3B03B1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm */; }; + 34D3B03C1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm */; }; + 34D3B03D1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B00F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm */; }; + 34D3B03E1E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0101E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib */; }; + 34D3B03F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0101E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib */; }; + 34D3B0401E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0101E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib */; }; + 34D3B0411E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0121E389D05004100F9 /* MWMEditorTextTableViewCell.mm */; }; + 34D3B0421E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0121E389D05004100F9 /* MWMEditorTextTableViewCell.mm */; }; + 34D3B0431E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0121E389D05004100F9 /* MWMEditorTextTableViewCell.mm */; }; + 34D3B0441E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0131E389D05004100F9 /* MWMEditorTextTableViewCell.xib */; }; + 34D3B0451E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0131E389D05004100F9 /* MWMEditorTextTableViewCell.xib */; }; + 34D3B0461E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0131E389D05004100F9 /* MWMEditorTextTableViewCell.xib */; }; + 34D3B0471E389D05004100F9 /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0151E389D05004100F9 /* MWMNoteCell.mm */; }; + 34D3B0481E389D05004100F9 /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0151E389D05004100F9 /* MWMNoteCell.mm */; }; + 34D3B0491E389D05004100F9 /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B0151E389D05004100F9 /* MWMNoteCell.mm */; }; + 34D3B04A1E389D05004100F9 /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */; }; + 34D3B04B1E389D05004100F9 /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */; }; + 34D3B04C1E389D05004100F9 /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */; }; 34D3B04E1E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; 34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; 34D3B0501E38A20C004100F9 /* Bundle+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */; }; @@ -888,72 +942,21 @@ F6E2FDA31E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC381E097B9F0083EBEC /* MWMCuisineEditorViewController.mm */; }; F6E2FDA41E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC381E097B9F0083EBEC /* MWMCuisineEditorViewController.mm */; }; F6E2FDA51E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC381E097B9F0083EBEC /* MWMCuisineEditorViewController.mm */; }; - F6E2FDA61E097BA00083EBEC /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3A1E097B9F0083EBEC /* MWMButtonCell.mm */; }; - F6E2FDA71E097BA00083EBEC /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3A1E097B9F0083EBEC /* MWMButtonCell.mm */; }; - F6E2FDA81E097BA00083EBEC /* MWMButtonCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3A1E097B9F0083EBEC /* MWMButtonCell.mm */; }; - F6E2FDA91E097BA00083EBEC /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3B1E097B9F0083EBEC /* MWMButtonCell.xib */; }; - F6E2FDAA1E097BA00083EBEC /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3B1E097B9F0083EBEC /* MWMButtonCell.xib */; }; - F6E2FDAB1E097BA00083EBEC /* MWMButtonCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3B1E097B9F0083EBEC /* MWMButtonCell.xib */; }; - F6E2FDAC1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3D1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; - F6E2FDAD1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3D1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; - F6E2FDAE1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC3D1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm */; }; - F6E2FDAF1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3E1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; - F6E2FDB01E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3E1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; - F6E2FDB11E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3E1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib */; }; - F6E2FDB21E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3F1E097B9F0083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; - F6E2FDB31E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3F1E097B9F0083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; - F6E2FDB41E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC3F1E097B9F0083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */; }; F6E2FDB51E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */; }; F6E2FDB61E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */; }; F6E2FDB71E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */; }; F6E2FDB81E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */; }; F6E2FDB91E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */; }; F6E2FDBA1E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */; }; - F6E2FDBB1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC441E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.mm */; }; - F6E2FDBC1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC441E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.mm */; }; - F6E2FDBD1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC441E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.mm */; }; - F6E2FDBE1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC451E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.xib */; }; - F6E2FDBF1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC451E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.xib */; }; - F6E2FDC01E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC451E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.xib */; }; - F6E2FDC11E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC471E097B9F0083EBEC /* MWMEditorCategoryCell.mm */; }; - F6E2FDC21E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC471E097B9F0083EBEC /* MWMEditorCategoryCell.mm */; }; - F6E2FDC31E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC471E097B9F0083EBEC /* MWMEditorCategoryCell.mm */; }; - F6E2FDC41E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC481E097B9F0083EBEC /* MWMEditorCategoryCell.xib */; }; - F6E2FDC51E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC481E097B9F0083EBEC /* MWMEditorCategoryCell.xib */; }; - F6E2FDC61E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC481E097B9F0083EBEC /* MWMEditorCategoryCell.xib */; }; F6E2FDC71E097BA00083EBEC /* MWMEditorNotesFooter.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */; }; F6E2FDC81E097BA00083EBEC /* MWMEditorNotesFooter.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */; }; F6E2FDC91E097BA00083EBEC /* MWMEditorNotesFooter.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */; }; F6E2FDCA1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */; }; F6E2FDCB1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */; }; F6E2FDCC1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */; }; - F6E2FDCD1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4E1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.mm */; }; - F6E2FDCE1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4E1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.mm */; }; - F6E2FDCF1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC4E1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.mm */; }; - F6E2FDD01E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4F1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.xib */; }; - F6E2FDD11E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4F1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.xib */; }; - F6E2FDD21E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC4F1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.xib */; }; - F6E2FDD31E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC511E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.mm */; }; - F6E2FDD41E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC511E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.mm */; }; - F6E2FDD51E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC511E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.mm */; }; - F6E2FDD61E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC521E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.xib */; }; - F6E2FDD71E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC521E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.xib */; }; - F6E2FDD81E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC521E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.xib */; }; - F6E2FDD91E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC541E097B9F0083EBEC /* MWMEditorTextTableViewCell.mm */; }; - F6E2FDDA1E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC541E097B9F0083EBEC /* MWMEditorTextTableViewCell.mm */; }; - F6E2FDDB1E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC541E097B9F0083EBEC /* MWMEditorTextTableViewCell.mm */; }; - F6E2FDDC1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC551E097B9F0083EBEC /* MWMEditorTextTableViewCell.xib */; }; - F6E2FDDD1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC551E097B9F0083EBEC /* MWMEditorTextTableViewCell.xib */; }; - F6E2FDDE1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC551E097B9F0083EBEC /* MWMEditorTextTableViewCell.xib */; }; F6E2FDDF1E097BA00083EBEC /* MWMEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */; }; F6E2FDE01E097BA00083EBEC /* MWMEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */; }; F6E2FDE11E097BA00083EBEC /* MWMEditorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */; }; - F6E2FDE21E097BA00083EBEC /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC591E097B9F0083EBEC /* MWMNoteCell.mm */; }; - F6E2FDE31E097BA00083EBEC /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC591E097B9F0083EBEC /* MWMNoteCell.mm */; }; - F6E2FDE41E097BA00083EBEC /* MWMNoteCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC591E097B9F0083EBEC /* MWMNoteCell.mm */; }; - F6E2FDE51E097BA00083EBEC /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC5A1E097B9F0083EBEC /* MWMNoteCell.xib */; }; - F6E2FDE61E097BA00083EBEC /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC5A1E097B9F0083EBEC /* MWMNoteCell.xib */; }; - F6E2FDE71E097BA00083EBEC /* MWMNoteCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6E2FC5A1E097B9F0083EBEC /* MWMNoteCell.xib */; }; F6E2FDE81E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC5C1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.mm */; }; F6E2FDE91E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC5C1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.mm */; }; F6E2FDEA1E097BA00083EBEC /* MWMObjectsCategorySelectorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6E2FC5C1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.mm */; }; @@ -1616,6 +1619,32 @@ 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Id.swift"; sourceTree = ""; }; 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Cells.swift"; sourceTree = ""; }; 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Cells.swift"; sourceTree = ""; }; + 34D3AFFD1E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditorAdditionalNamePlaceholderTableViewCell.swift; sourceTree = ""; }; + 34D3AFFE1E389D05004100F9 /* MWMButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMButtonCell.h; sourceTree = ""; }; + 34D3AFFF1E389D05004100F9 /* MWMButtonCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMButtonCell.mm; sourceTree = ""; }; + 34D3B0001E389D05004100F9 /* MWMButtonCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMButtonCell.xib; sourceTree = ""; }; + 34D3B0011E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAddAdditionalNameTableViewCell.h; sourceTree = ""; }; + 34D3B0021E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAddAdditionalNameTableViewCell.mm; sourceTree = ""; }; + 34D3B0031E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAddAdditionalNameTableViewCell.xib; sourceTree = ""; }; + 34D3B0041E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNamePlaceholderTableViewCell.xib; sourceTree = ""; }; + 34D3B0051E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = ""; }; + 34D3B0061E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNameTableViewCell.mm; sourceTree = ""; }; + 34D3B0071E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNameTableViewCell.xib; sourceTree = ""; }; + 34D3B0081E389D05004100F9 /* MWMEditorCategoryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorCategoryCell.h; sourceTree = ""; }; + 34D3B0091E389D05004100F9 /* MWMEditorCategoryCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorCategoryCell.mm; sourceTree = ""; }; + 34D3B00A1E389D05004100F9 /* MWMEditorCategoryCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorCategoryCell.xib; sourceTree = ""; }; + 34D3B00B1E389D05004100F9 /* MWMEditorSelectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSelectTableViewCell.h; sourceTree = ""; }; + 34D3B00C1E389D05004100F9 /* MWMEditorSelectTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSelectTableViewCell.mm; sourceTree = ""; }; + 34D3B00D1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSelectTableViewCell.xib; sourceTree = ""; }; + 34D3B00E1E389D05004100F9 /* MWMEditorSwitchTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSwitchTableViewCell.h; sourceTree = ""; }; + 34D3B00F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSwitchTableViewCell.mm; sourceTree = ""; }; + 34D3B0101E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSwitchTableViewCell.xib; sourceTree = ""; }; + 34D3B0111E389D05004100F9 /* MWMEditorTextTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorTextTableViewCell.h; sourceTree = ""; }; + 34D3B0121E389D05004100F9 /* MWMEditorTextTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorTextTableViewCell.mm; sourceTree = ""; }; + 34D3B0131E389D05004100F9 /* MWMEditorTextTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorTextTableViewCell.xib; sourceTree = ""; }; + 34D3B0141E389D05004100F9 /* MWMNoteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNoteCell.h; sourceTree = ""; }; + 34D3B0151E389D05004100F9 /* MWMNoteCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNoteCell.mm; sourceTree = ""; }; + 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNoteCell.xib; sourceTree = ""; }; 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Init.swift"; sourceTree = ""; }; 34D4FA611E26572D003F53EF /* FirstLaunchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstLaunchController.swift; sourceTree = ""; }; 34D4FA651E265749003F53EF /* WhatsNewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhatsNewController.swift; sourceTree = ""; }; @@ -1900,45 +1929,20 @@ F6E2FC2E1E097B9F0083EBEC /* MWMBookmarkTitleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMBookmarkTitleCell.m; sourceTree = ""; }; F6E2FC2F1E097B9F0083EBEC /* MWMBookmarkTitleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkTitleCell.xib; sourceTree = ""; }; F6E2FC301E097B9F0083EBEC /* MWMEditBookmarkController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditBookmarkController.h; sourceTree = ""; }; - F6E2FC311E097B9F0083EBEC /* MWMEditBookmarkController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditBookmarkController.mm; sourceTree = ""; }; + F6E2FC311E097B9F0083EBEC /* MWMEditBookmarkController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditBookmarkController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FC341E097B9F0083EBEC /* MWMEditorAdditionalNamesTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNamesTableViewController.h; sourceTree = ""; }; F6E2FC351E097B9F0083EBEC /* MWMEditorAdditionalNamesTableViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNamesTableViewController.mm; sourceTree = ""; }; F6E2FC371E097B9F0083EBEC /* MWMCuisineEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMCuisineEditorViewController.h; sourceTree = ""; }; F6E2FC381E097B9F0083EBEC /* MWMCuisineEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMCuisineEditorViewController.mm; sourceTree = ""; }; - F6E2FC391E097B9F0083EBEC /* MWMButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMButtonCell.h; sourceTree = ""; }; - F6E2FC3A1E097B9F0083EBEC /* MWMButtonCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMButtonCell.mm; sourceTree = ""; }; - F6E2FC3B1E097B9F0083EBEC /* MWMButtonCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMButtonCell.xib; sourceTree = ""; }; - F6E2FC3C1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAddAdditionalNameTableViewCell.h; sourceTree = ""; }; - F6E2FC3D1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAddAdditionalNameTableViewCell.mm; sourceTree = ""; }; - F6E2FC3E1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAddAdditionalNameTableViewCell.xib; sourceTree = ""; }; - F6E2FC3F1E097B9F0083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNamePlaceholderTableViewCell.xib; sourceTree = ""; }; F6E2FC401E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNamesHeader.h; sourceTree = ""; }; F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNamesHeader.mm; sourceTree = ""; }; F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNamesHeader.xib; sourceTree = ""; }; - F6E2FC431E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = ""; }; - F6E2FC441E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNameTableViewCell.mm; sourceTree = ""; }; - F6E2FC451E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNameTableViewCell.xib; sourceTree = ""; }; - F6E2FC461E097B9F0083EBEC /* MWMEditorCategoryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorCategoryCell.h; sourceTree = ""; }; - F6E2FC471E097B9F0083EBEC /* MWMEditorCategoryCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorCategoryCell.mm; sourceTree = ""; }; - F6E2FC481E097B9F0083EBEC /* MWMEditorCategoryCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorCategoryCell.xib; sourceTree = ""; }; F6E2FC491E097B9F0083EBEC /* MWMEditorCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorCommon.h; sourceTree = ""; }; F6E2FC4A1E097B9F0083EBEC /* MWMEditorNotesFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorNotesFooter.h; sourceTree = ""; }; F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorNotesFooter.mm; sourceTree = ""; }; F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNotesFooter.xib; sourceTree = ""; }; - F6E2FC4D1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSelectTableViewCell.h; sourceTree = ""; }; - F6E2FC4E1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSelectTableViewCell.mm; sourceTree = ""; }; - F6E2FC4F1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSelectTableViewCell.xib; sourceTree = ""; }; - F6E2FC501E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorSwitchTableViewCell.h; sourceTree = ""; }; - F6E2FC511E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorSwitchTableViewCell.mm; sourceTree = ""; }; - F6E2FC521E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorSwitchTableViewCell.xib; sourceTree = ""; }; - F6E2FC531E097B9F0083EBEC /* MWMEditorTextTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorTextTableViewCell.h; sourceTree = ""; }; - F6E2FC541E097B9F0083EBEC /* MWMEditorTextTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorTextTableViewCell.mm; sourceTree = ""; }; - F6E2FC551E097B9F0083EBEC /* MWMEditorTextTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorTextTableViewCell.xib; sourceTree = ""; }; F6E2FC561E097B9F0083EBEC /* MWMEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorViewController.h; sourceTree = ""; }; - F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorViewController.mm; sourceTree = ""; }; - F6E2FC581E097B9F0083EBEC /* MWMNoteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNoteCell.h; sourceTree = ""; }; - F6E2FC591E097B9F0083EBEC /* MWMNoteCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNoteCell.mm; sourceTree = ""; }; - F6E2FC5A1E097B9F0083EBEC /* MWMNoteCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMNoteCell.xib; sourceTree = ""; }; + F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditorViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FC5B1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMObjectsCategorySelectorController.h; sourceTree = ""; }; F6E2FC5C1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMObjectsCategorySelectorController.mm; sourceTree = ""; }; F6E2FC5F1E097B9F0083EBEC /* MWMOpeningHoursAddClosedTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMOpeningHoursAddClosedTableViewCell.h; sourceTree = ""; }; @@ -2984,6 +2988,39 @@ path = CustomViews/MapViewControls; sourceTree = ""; }; + 34D3AFFC1E389D05004100F9 /* Cells */ = { + isa = PBXGroup; + children = ( + 34D3AFFD1E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift */, + 34D3AFFE1E389D05004100F9 /* MWMButtonCell.h */, + 34D3AFFF1E389D05004100F9 /* MWMButtonCell.mm */, + 34D3B0001E389D05004100F9 /* MWMButtonCell.xib */, + 34D3B0011E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.h */, + 34D3B0021E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm */, + 34D3B0031E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib */, + 34D3B0041E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */, + 34D3B0051E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.h */, + 34D3B0061E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm */, + 34D3B0071E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib */, + 34D3B0081E389D05004100F9 /* MWMEditorCategoryCell.h */, + 34D3B0091E389D05004100F9 /* MWMEditorCategoryCell.mm */, + 34D3B00A1E389D05004100F9 /* MWMEditorCategoryCell.xib */, + 34D3B00B1E389D05004100F9 /* MWMEditorSelectTableViewCell.h */, + 34D3B00C1E389D05004100F9 /* MWMEditorSelectTableViewCell.mm */, + 34D3B00D1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib */, + 34D3B00E1E389D05004100F9 /* MWMEditorSwitchTableViewCell.h */, + 34D3B00F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm */, + 34D3B0101E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib */, + 34D3B0111E389D05004100F9 /* MWMEditorTextTableViewCell.h */, + 34D3B0121E389D05004100F9 /* MWMEditorTextTableViewCell.mm */, + 34D3B0131E389D05004100F9 /* MWMEditorTextTableViewCell.xib */, + 34D3B0141E389D05004100F9 /* MWMNoteCell.h */, + 34D3B0151E389D05004100F9 /* MWMNoteCell.mm */, + 34D3B0161E389D05004100F9 /* MWMNoteCell.xib */, + ); + path = Cells; + sourceTree = ""; + }; 34D783C71B5F9D7800E0C0EE /* Views */ = { isa = PBXGroup; children = ( @@ -3353,41 +3390,17 @@ isa = PBXGroup; children = ( F6E2FC331E097B9F0083EBEC /* AdditionalNames */, + 34D3AFFC1E389D05004100F9 /* Cells */, F6E2FC361E097B9F0083EBEC /* Cuisine */, - F6E2FC391E097B9F0083EBEC /* MWMButtonCell.h */, - F6E2FC3A1E097B9F0083EBEC /* MWMButtonCell.mm */, - F6E2FC3B1E097B9F0083EBEC /* MWMButtonCell.xib */, - F6E2FC3C1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.h */, - F6E2FC3D1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm */, - F6E2FC3E1E097B9F0083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib */, - F6E2FC3F1E097B9F0083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib */, F6E2FC401E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.h */, F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */, F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */, - F6E2FC431E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.h */, - F6E2FC441E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.mm */, - F6E2FC451E097B9F0083EBEC /* MWMEditorAdditionalNameTableViewCell.xib */, - F6E2FC461E097B9F0083EBEC /* MWMEditorCategoryCell.h */, - F6E2FC471E097B9F0083EBEC /* MWMEditorCategoryCell.mm */, - F6E2FC481E097B9F0083EBEC /* MWMEditorCategoryCell.xib */, F6E2FC491E097B9F0083EBEC /* MWMEditorCommon.h */, F6E2FC4A1E097B9F0083EBEC /* MWMEditorNotesFooter.h */, F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */, F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */, - F6E2FC4D1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.h */, - F6E2FC4E1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.mm */, - F6E2FC4F1E097B9F0083EBEC /* MWMEditorSelectTableViewCell.xib */, - F6E2FC501E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.h */, - F6E2FC511E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.mm */, - F6E2FC521E097B9F0083EBEC /* MWMEditorSwitchTableViewCell.xib */, - F6E2FC531E097B9F0083EBEC /* MWMEditorTextTableViewCell.h */, - F6E2FC541E097B9F0083EBEC /* MWMEditorTextTableViewCell.mm */, - F6E2FC551E097B9F0083EBEC /* MWMEditorTextTableViewCell.xib */, F6E2FC561E097B9F0083EBEC /* MWMEditorViewController.h */, F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */, - F6E2FC581E097B9F0083EBEC /* MWMNoteCell.h */, - F6E2FC591E097B9F0083EBEC /* MWMNoteCell.mm */, - F6E2FC5A1E097B9F0083EBEC /* MWMNoteCell.xib */, F6E2FC5B1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.h */, F6E2FC5C1E097B9F0083EBEC /* MWMObjectsCategorySelectorController.mm */, F6E2FC5D1E097B9F0083EBEC /* OpeningHours */, @@ -4092,7 +4105,6 @@ 346225911DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */, F6E2FEB41E097BA00083EBEC /* _MWMPPPSpace.xib in Resources */, F6E2FEED1E097BA00083EBEC /* MWMSearchView.xib in Resources */, - F6E2FDA91E097BA00083EBEC /* MWMButtonCell.xib in Resources */, F6FE3C3B1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib in Resources */, 5605022F1B6211E100169CAD /* sound-strings in Resources */, 452FCA3B1B6A3DF7007019AB /* colors.txt in Resources */, @@ -4100,9 +4112,9 @@ F6E2FD6D1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */, FA46DA2C12D4166E00968C36 /* countries.txt in Resources */, 671182E21C7F0DD400CB8177 /* packed_polygons_obsolete.bin in Resources */, + 34D3B03E1E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */, 4A23D15C1B8B4DD700D4EB6F /* resources-6plus_clear in Resources */, EE583CBB12F773F00042CBE3 /* unicode_blocks.txt in Resources */, - F6E2FDDC1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */, 340E1EF41E2F614400CE49BF /* SearchFilters.storyboard in Resources */, F6E2FE8A1E097BA00083EBEC /* MWMPlacePageInfoCell.xib in Resources */, EEFE7C1412F8C9E1006AF8C3 /* fonts_blacklist.txt in Resources */, @@ -4110,20 +4122,19 @@ F6E2FD581E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */, 4A23D15F1B8B4DD700D4EB6F /* resources-xxhdpi_clear in Resources */, F64F199E1AB81A00006EAF7E /* MWMDefaultAlert.xib in Resources */, - F6E2FDB21E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, F6E2FE0C1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */, F6E2FE2D1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.xib in Resources */, F6E2FF141E097BA00083EBEC /* MWMSearchHistoryRequestCell.xib in Resources */, 34F73F9B1E082FF800AC1FD6 /* InfoPlist.strings in Resources */, 349D1AD11E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib in Resources */, F6E2FF1A1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */, + 34D3B0261E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, 349A13841DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */, EEFE7C1512F8C9E1006AF8C3 /* fonts_whitelist.txt in Resources */, F6E2FEB11E097BA00083EBEC /* _MWMPPPSchedule.xib in Resources */, F64F4B711B4A41D40081A24A /* MWMDownloaderDialogHeader.xib in Resources */, FAFF422A1347F101009BBB14 /* World.mwm in Resources */, F607C1891C032A8800B53A87 /* resources-hdpi_dark in Resources */, - F6E2FDBE1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, EEA61601134C496A003A9827 /* 01_dejavusans.ttf in Resources */, F6E2FD611E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */, 340E1EEB1E2F614400CE49BF /* Authorization.storyboard in Resources */, @@ -4134,10 +4145,10 @@ F6E2FE841E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */, F6E2FD9A1E097BA00083EBEC /* MWMBookmarkTitleCell.xib in Resources */, EEA61603134C496A003A9827 /* 03_jomolhari-id-a3d.ttf in Resources */, - F6E2FDC41E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */, F6E2FE511E097BA00083EBEC /* MWMActionBarButton.xib in Resources */, EEA61604134C496A003A9827 /* 04_padauk.ttf in Resources */, F6E2FEAE1E097BA00083EBEC /* _MWMPPPExternalTitle.xib in Resources */, + 34D3B0381E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */, 3406FA181C6E0D8F00E9FAD2 /* MWMMapDownloadDialog.xib in Resources */, 340E1EFD1E2F614400CE49BF /* Welcome.storyboard in Resources */, 349B92701DF0526D007779DD /* MWMToast.xib in Resources */, @@ -4184,8 +4195,8 @@ 6B9978351C89A316003B8AA0 /* editor.config in Resources */, F6E2FEAB1E097BA00083EBEC /* _MWMPPPBooking.xib in Resources */, FAAEA7D1161BD26600CCD661 /* synonyms.txt in Resources */, + 34D3B04A1E389D05004100F9 /* MWMNoteCell.xib in Resources */, 4A00DBDF1AB704C400113624 /* drules_proto_dark.bin in Resources */, - F6E2FDD61E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */, F6E2FE751E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */, F6E2FF411E097BA00083EBEC /* MWMSearchTableViewController.xib in Resources */, 4A23D15D1B8B4DD700D4EB6F /* resources-mdpi_clear in Resources */, @@ -4193,10 +4204,11 @@ F6B97B291CD0CB170009B612 /* MWMBookmarkNameCell.xib in Resources */, F6E2FEA51E097BA00083EBEC /* MWMPPView.xib in Resources */, 340E1EEE1E2F614400CE49BF /* LaunchScreen.storyboard in Resources */, - F6E2FDE51E097BA00083EBEC /* MWMNoteCell.xib in Resources */, + 34D3B02C1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, 349D1AD41E2E325B004A2006 /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */, F6E2FF501E097BA00083EBEC /* MWMAboutControllerHeader.xib in Resources */, F6E2FE691E097BA00083EBEC /* MWMPlacePageButtonCell.xib in Resources */, + 34D3B0321E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */, F6E2FF321E097BA00083EBEC /* MWMSearchCommonCell.xib in Resources */, 671182E11C7F0DD400CB8177 /* countries_obsolete.txt in Resources */, F6E2FEB71E097BA00083EBEC /* _MWMPPPSubtitle.xib in Resources */, @@ -4208,6 +4220,7 @@ F623DA6B1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */, F6E2FF291E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */, F6E2FDCA1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */, + 34D3B0231E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, 341C2A5B1B720B8A00AD41A1 /* MWMAPIBarView.xib in Resources */, F653CE181C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib in Resources */, F6BB6CC01BB17D7000DF1DF2 /* MWMRoutePointCell.xib in Resources */, @@ -4223,15 +4236,16 @@ F6E2FE5D1E097BA00083EBEC /* MWMPPPreviewBannerCell.xib in Resources */, 349D1AE01E2E325C004A2006 /* MWMBottomMenuViewController.xib in Resources */, F6E2FD941E097BA00083EBEC /* MWMBookmarkColorViewController.xib in Resources */, - F6E2FDD01E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */, F6BC1E541ACBF9AB00EF0360 /* MWMFacebookAlert.xib in Resources */, F6E2FE061E097BA00083EBEC /* MWMOpeningHoursDaysSelectorTableViewCell.xib in Resources */, F607C1871C032A8800B53A87 /* resources-hdpi_clear in Resources */, F6E2FD731E097BA00083EBEC /* MWMMapDownloaderTableViewCell.xib in Resources */, + 34D3B01D1E389D05004100F9 /* MWMButtonCell.xib in Resources */, F64F4B6F1B46A5380081A24A /* MWMDownloaderDialogCell.xib in Resources */, 340E1EF71E2F614400CE49BF /* Settings.storyboard in Resources */, F6E2FE7E1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.xib in Resources */, F6E2FE001E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.xib in Resources */, + 34D3B0441E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */, 340E1EF11E2F614400CE49BF /* Main.storyboard in Resources */, 4A23D15E1B8B4DD700D4EB6F /* resources-xhdpi_clear in Resources */, F64F199A1AB81A00006EAF7E /* MWMAlertViewController.xib in Resources */, @@ -4246,7 +4260,6 @@ F68FCB8D1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.xib in Resources */, 676507611C10559B00830BB3 /* colors.txt in Resources */, 346225921DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib in Resources */, - F6E2FDB31E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, F6FE3C3C1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib in Resources */, F6E2FD951E097BA00083EBEC /* MWMBookmarkColorViewController.xib in Resources */, F6E2FF061E097BA00083EBEC /* MWMSearchHistoryClearCell.xib in Resources */, @@ -4256,13 +4269,13 @@ F623DA6F1C9C2E62006A3436 /* MWMAddPlaceNavigationBar.xib in Resources */, 6741A9451BF340DE002C974C /* classificator.txt in Resources */, 34F73F9C1E082FF800AC1FD6 /* InfoPlist.strings in Resources */, + 34D3B03F1E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */, F6E2FEAC1E097BA00083EBEC /* _MWMPPPBooking.xib in Resources */, 6741A9491BF340DE002C974C /* countries.txt in Resources */, 6741A94A1BF340DE002C974C /* resources-6plus_clear in Resources */, 340E1EF51E2F614400CE49BF /* SearchFilters.storyboard in Resources */, F6E2FE0D1E097BA00083EBEC /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */, F6E2FF421E097BA00083EBEC /* MWMSearchTableViewController.xib in Resources */, - F6E2FDE61E097BA00083EBEC /* MWMNoteCell.xib in Resources */, 6741A94B1BF340DE002C974C /* unicode_blocks.txt in Resources */, 6741A94C1BF340DE002C974C /* fonts_blacklist.txt in Resources */, F6E2FF2A1E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */, @@ -4273,6 +4286,7 @@ 349A13851DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */, F653CE0E1C6DEB2E00A453F1 /* MWMDropDown.xib in Resources */, 349D1AD21E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib in Resources */, + 34D3B0271E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, F6E2FD6E1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */, 6741A94F1BF340DE002C974C /* MWMDefaultAlert.xib in Resources */, 6741A9501BF340DE002C974C /* fonts_whitelist.txt in Resources */, @@ -4290,14 +4304,13 @@ F607C18A1C032A8800B53A87 /* resources-hdpi_dark in Resources */, 6741A9531BF340DE002C974C /* 01_dejavusans.ttf in Resources */, 6741A9541BF340DE002C974C /* 02_droidsans-fallback.ttf in Resources */, - F6E2FDC51E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */, 6741A9551BF340DE002C974C /* resources-xxhdpi_dark in Resources */, F6E2FE011E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.xib in Resources */, 671182E61C7F0DDD00CB8177 /* countries_obsolete.txt in Resources */, + 34D3B0391E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */, F6E2FE7F1E097BA00083EBEC /* MWMPlacePageOpeningHoursCell.xib in Resources */, 340E1EFE1E2F614400CE49BF /* Welcome.storyboard in Resources */, F6E2FEE81E097BA00083EBEC /* MWMSearchNoResults.xib in Resources */, - F6E2FDD71E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */, 349B92711DF0526D007779DD /* MWMToast.xib in Resources */, 6741A9571BF340DE002C974C /* 03_jomolhari-id-a3d.ttf in Resources */, 6741A9581BF340DE002C974C /* 04_padauk.ttf in Resources */, @@ -4327,7 +4340,6 @@ 3476B8DD1BFDD30B00874594 /* tts-how-to-set-up-voice.html in Resources */, 6741A9681BF340DE002C974C /* faq.html in Resources */, 6741A96C1BF340DE002C974C /* MWMDownloadTransitMapAlert.xib in Resources */, - F6E2FDAA1E097BA00083EBEC /* MWMButtonCell.xib in Resources */, F6E2FE461E097BA00083EBEC /* MWMDirectionView.xib in Resources */, 6741A96D1BF340DE002C974C /* MWMLocationAlert.xib in Resources */, F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */, @@ -4335,25 +4347,25 @@ 6741A96E1BF340DE002C974C /* MWMRoutePreview.xib in Resources */, F6E2FD681E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */, 6741A9701BF340DE002C974C /* MWMiPadRoutePreview.xib in Resources */, - F6E2FDDD1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */, 6741A9711BF340DE002C974C /* copyright.html in Resources */, 3463BA691DE81DB90082417F /* MWMTrafficButtonViewController.xib in Resources */, F6E2FEAF1E097BA00083EBEC /* _MWMPPPExternalTitle.xib in Resources */, 349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */, 6741A9741BF340DE002C974C /* resources-6plus_dark in Resources */, + 34D3B04B1E389D05004100F9 /* MWMNoteCell.xib in Resources */, 3454E0601DF00DC000F40F46 /* banners.txt in Resources */, 6741A9751BF340DE002C974C /* WorldCoasts.mwm in Resources */, 3490D2E31CE9DD2500D0B838 /* MWMSideButtonsView.xib in Resources */, - F6E2FDBF1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, 6741A9761BF340DE002C974C /* packed_polygons.bin in Resources */, 6741A9781BF340DE002C974C /* AddSetTableViewCell.xib in Resources */, F6E2FE5E1E097BA00083EBEC /* MWMPPPreviewBannerCell.xib in Resources */, - F6E2FDB01E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, 340E1EEF1E2F614400CE49BF /* LaunchScreen.storyboard in Resources */, + 34D3B02D1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, 6741A97D1BF340DE002C974C /* synonyms.txt in Resources */, 349D1AD51E2E325B004A2006 /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */, F6E2FEEE1E097BA00083EBEC /* MWMSearchView.xib in Resources */, F6E2FE6D1E097BA00083EBEC /* _MWMOHHeaderCell.xib in Resources */, + 34D3B0331E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */, F6E2FDB91E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */, F6E2FDCB1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */, 6741A97E1BF340DE002C974C /* drules_proto_dark.bin in Resources */, @@ -4365,6 +4377,7 @@ 6741A9811BF340DE002C974C /* MWMRateAlert.xib in Resources */, 6741A9871BF340DE002C974C /* drules_proto_clear.bin in Resources */, F6E2FDEF1E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */, + 34D3B0241E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, F6E2FE851E097BA00083EBEC /* MWMPlacePageOpeningHoursWeekDayView.xib in Resources */, F6E2FEB51E097BA00083EBEC /* _MWMPPPSpace.xib in Resources */, 6741A9881BF340DE002C974C /* MWMAPIBarView.xib in Resources */, @@ -4384,10 +4397,12 @@ F6E2FEA91E097BA00083EBEC /* _MWMPPPAddress.xib in Resources */, F6E2FEBB1E097BA00083EBEC /* _MWMPPPTitle.xib in Resources */, 6741A9951BF340DE002C974C /* MWMDownloaderDialogCell.xib in Resources */, + 34D3B01E1E389D05004100F9 /* MWMButtonCell.xib in Resources */, F6BD1D241CA412E40047B8E8 /* MWMOsmAuthAlert.xib in Resources */, 340E1EF81E2F614400CE49BF /* Settings.storyboard in Resources */, 6741A9981BF340DE002C974C /* resources-xhdpi_clear in Resources */, 6741A9991BF340DE002C974C /* MWMAlertViewController.xib in Resources */, + 34D3B0451E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */, 340E1EF21E2F614400CE49BF /* Main.storyboard in Resources */, 6741A99F1BF340DE002C974C /* 07_roboto_medium.ttf in Resources */, F6E2FEA61E097BA00083EBEC /* MWMPPView.xib in Resources */, @@ -4400,14 +4415,15 @@ buildActionMask = 2147483647; files = ( 340E1EF61E2F614400CE49BF /* SearchFilters.storyboard in Resources */, - F6E2FDD21E097BA00083EBEC /* MWMEditorSelectTableViewCell.xib in Resources */, 849CF5E61DE842290024A8A5 /* patterns.txt in Resources */, + 34D3B01F1E389D05004100F9 /* MWMButtonCell.xib in Resources */, 849CF5E71DE842290024A8A5 /* MWMSearchNoResultsAlert.xib in Resources */, F6E2FDFC1E097BA00083EBEC /* MWMOpeningHoursAllDayTableViewCell.xib in Resources */, 849CF5E81DE842290024A8A5 /* MWMPlaceDoesntExistAlert.xib in Resources */, F6E2FD6F1E097BA00083EBEC /* MWMMapDownloaderSubplaceTableViewCell.xib in Resources */, 849CF5EA1DE842290024A8A5 /* sound-strings in Resources */, 849CF5EC1DE842290024A8A5 /* colors.txt in Resources */, + 34D3B0341E389D05004100F9 /* MWMEditorCategoryCell.xib in Resources */, F6E2FEAA1E097BA00083EBEC /* _MWMPPPAddress.xib in Resources */, F6E2FD631E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.xib in Resources */, F6E2FE951E097BA00083EBEC /* MWMPlacePageTaxiCell.xib in Resources */, @@ -4416,7 +4432,6 @@ 849CF5F41DE842290024A8A5 /* countries.txt in Resources */, 849CF5F51DE842290024A8A5 /* packed_polygons_obsolete.bin in Resources */, F6E2FD5A1E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.xib in Resources */, - F6E2FDAB1E097BA00083EBEC /* MWMButtonCell.xib in Resources */, 849CF5F61DE842290024A8A5 /* resources-6plus_clear in Resources */, 849CF5F81DE842290024A8A5 /* unicode_blocks.txt in Resources */, 849CF5F91DE842290024A8A5 /* fonts_blacklist.txt in Resources */, @@ -4425,8 +4440,7 @@ F6E2FE171E097BA00083EBEC /* MWMOpeningHoursTimeSelectorTableViewCell.xib in Resources */, F6E2FE081E097BA00083EBEC /* MWMOpeningHoursDaysSelectorTableViewCell.xib in Resources */, F6E2FF161E097BA00083EBEC /* MWMSearchHistoryRequestCell.xib in Resources */, - F6E2FDB11E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, - F6E2FDC01E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, + 34D3B0401E389D05004100F9 /* MWMEditorSwitchTableViewCell.xib in Resources */, F6E2FEA71E097BA00083EBEC /* MWMPPView.xib in Resources */, F6E2FEB31E097BA00083EBEC /* _MWMPPPSchedule.xib in Resources */, 349D1AD31E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib in Resources */, @@ -4441,23 +4455,23 @@ 849CF6021DE842290024A8A5 /* World.mwm in Resources */, 849CF6031DE842290024A8A5 /* resources-hdpi_dark in Resources */, 849CF6041DE842290024A8A5 /* 01_dejavusans.ttf in Resources */, - F6E2FDE71E097BA00083EBEC /* MWMNoteCell.xib in Resources */, 849CF6051DE842290024A8A5 /* 02_droidsans-fallback.ttf in Resources */, F6E2FEB91E097BA00083EBEC /* _MWMPPPSubtitle.xib in Resources */, F6E2FDF01E097BA00083EBEC /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */, - F6E2FDDE1E097BA00083EBEC /* MWMEditorTextTableViewCell.xib in Resources */, 340E1EED1E2F614400CE49BF /* Authorization.storyboard in Resources */, - F6E2FDC61E097BA00083EBEC /* MWMEditorCategoryCell.xib in Resources */, 849CF6061DE842290024A8A5 /* resources-xxhdpi_dark in Resources */, F6E2FF1C1E097BA00083EBEC /* MWMSearchTabbedCollectionViewCell.xib in Resources */, + 34D3B0251E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.xib in Resources */, F6E2FD541E097BA00083EBEC /* MWMMapDownloaderAdsTableViewCell.xib in Resources */, F6E2FF101E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.xib in Resources */, + 34D3B04C1E389D05004100F9 /* MWMNoteCell.xib in Resources */, F6E2FD691E097BA00083EBEC /* MWMMapDownloaderPlaceTableViewCell.xib in Resources */, F6E2FDBA1E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.xib in Resources */, 849CF6091DE842290024A8A5 /* 03_jomolhari-id-a3d.ttf in Resources */, 849CF60B1DE842290024A8A5 /* 04_padauk.ttf in Resources */, 849CF60D1DE842290024A8A5 /* MWMMapDownloadDialog.xib in Resources */, F6E2FDCC1E097BA00083EBEC /* MWMEditorNotesFooter.xib in Resources */, + 34D3B03A1E389D05004100F9 /* MWMEditorSelectTableViewCell.xib in Resources */, 849CF6101DE842290024A8A5 /* 05_khmeros.ttf in Resources */, 340E1EF01E2F614400CE49BF /* LaunchScreen.storyboard in Resources */, 349D1AD61E2E325C004A2006 /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */, @@ -4473,6 +4487,7 @@ F6E2FF2B1E097BA00083EBEC /* MWMSearchTabButtonsView.xib in Resources */, 849CF6191DE842290024A8A5 /* MWMRoutingDisclaimerAlert.xib in Resources */, 8408BCE21E080DEF00789784 /* MWMTrafficButtonViewController.xib in Resources */, + 34D3B0281E389D05004100F9 /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, 849CF61A1DE842290024A8A5 /* resources-xhdpi_dark in Resources */, F6E2FE651E097BA00083EBEC /* MWMBookmarkCell.xib in Resources */, 849CF61B1DE842290024A8A5 /* MWMDropDown.xib in Resources */, @@ -4489,7 +4504,6 @@ F6E2FF3A1E097BA00083EBEC /* MWMSearchSuggestionCell.xib in Resources */, F6E2FE471E097BA00083EBEC /* MWMDirectionView.xib in Resources */, 3454E0611DF00DC100F40F46 /* banners.txt in Resources */, - F6E2FDB41E097BA00083EBEC /* MWMEditorAdditionalNamePlaceholderTableViewCell.xib in Resources */, 849CF6381DE842290024A8A5 /* MWMiPadRoutePreview.xib in Resources */, 849CF6391DE842290024A8A5 /* copyright.html in Resources */, F6E2FEB01E097BA00083EBEC /* _MWMPPPExternalTitle.xib in Resources */, @@ -4518,6 +4532,7 @@ 849CF6571DE842290024A8A5 /* countries_obsolete.txt in Resources */, 849CF6581DE842290024A8A5 /* countries-strings in Resources */, 849CF65A1DE842290024A8A5 /* MWMOsmAuthAlert.xib in Resources */, + 34D3B0461E389D05004100F9 /* MWMEditorTextTableViewCell.xib in Resources */, F6E2FE1D1E097BA00083EBEC /* MWMOpeningHoursTimeSpanTableViewCell.xib in Resources */, 849CF65F1DE842290024A8A5 /* drules_proto_clear.bin in Resources */, F6E2FEB61E097BA00083EBEC /* _MWMPPPSpace.xib in Resources */, @@ -4526,9 +4541,9 @@ 849CF6641DE842290024A8A5 /* MWMAddPlaceNavigationBar.xib in Resources */, F6E2FD9C1E097BA00083EBEC /* MWMBookmarkTitleCell.xib in Resources */, 849CF6651DE842290024A8A5 /* MWMRoutePointCell.xib in Resources */, + 34D3B02E1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.xib in Resources */, 849CF6661DE842290024A8A5 /* MWMCircularProgress.xib in Resources */, 34F73F9D1E082FF800AC1FD6 /* InfoPlist.strings in Resources */, - F6E2FDD81E097BA00083EBEC /* MWMEditorSwitchTableViewCell.xib in Resources */, 849CF66D1DE842290024A8A5 /* MWMEditorViralAlert.xib in Resources */, 340E1EFF1E2F614400CE49BF /* Welcome.storyboard in Resources */, F6E2FE771E097BA00083EBEC /* MWMOpeningHoursCell.xib in Resources */, @@ -4633,7 +4648,6 @@ 34D3B04E1E38A20C004100F9 /* Bundle+Init.swift in Sources */, 340837161B72451A00B5C185 /* MWMShareActivityItem.mm in Sources */, F6E2FF0B1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, - F6E2FDCD1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, F6E2FF531E097BA00083EBEC /* MWMHelpController.mm in Sources */, F6E2FF591E097BA00083EBEC /* MWMNightModeController.mm in Sources */, 3454D7B81E07F045004AF2AD /* CALayer+RuntimeAttributes.mm in Sources */, @@ -4654,16 +4668,19 @@ 34F742311E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 340475801E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 3486B51D1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, + 34D3B0201E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, F6E2FE481E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 3404754F1E081A4600C92850 /* fabric_logging_ios.mm in Sources */, 34ABA6281C2D567B00FE1BEC /* MWMInputLoginValidator.mm in Sources */, 560634F21B78806100F3D670 /* MWMTextToSpeech.mm in Sources */, F6E2FECF1E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, 34D4FA661E265749003F53EF /* WhatsNewController.swift in Sources */, + 34D3B01A1E389D05004100F9 /* MWMButtonCell.mm in Sources */, 3486B5151E27AD3B0069C126 /* Framework.cpp in Sources */, 3454D7D01E07F045004AF2AD /* UIImage+RGBAData.mm in Sources */, F6E2FF081E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD8E1E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, + 34D3B0411E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */, F6E2FE601E097BA00083EBEC /* MWMBookmarkCell.mm in Sources */, F6E2FEA21E097BA00083EBEC /* MWMPPView.mm in Sources */, F6791B131C43DEA7007A8A6E /* MWMStartButton.mm in Sources */, @@ -4673,7 +4690,6 @@ 349D1ABB1E2D05EF004A2006 /* SearchBar.swift in Sources */, F6E2FD791E097BA00083EBEC /* MWMMapDownloaderDefaultDataSource.mm in Sources */, F6E2FF3E1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */, - F6E2FDAC1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, F6E2FDDF1E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, F6BB6CC61BB18C0900DF1DF2 /* MWMRoutePointCell.m in Sources */, F6E2FDB51E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -4688,6 +4704,7 @@ F6E2FE4B1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 3404757D1E081B3300C92850 /* iosOGLContext.mm in Sources */, 34D3AFF11E37945B004100F9 /* UITableView+Cells.swift in Sources */, + 34D3B02F1E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */, F6E2FD5B1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, 340475611E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, 342EE4111C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */, @@ -4706,15 +4723,14 @@ F64F19991AB81A00006EAF7E /* MWMAlertViewController.mm in Sources */, F6E2FE541E097BA00083EBEC /* MWMPlacePageActionBar.mm in Sources */, 34C9BD091C6DBCDA000DC38D /* MWMNavigationController.mm in Sources */, + 34D3B0171E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */, 3406FA151C6E0C3300E9FAD2 /* MWMMapDownloadDialog.mm in Sources */, F6E2FECC1E097BA00083EBEC /* MWMSearchFilterTransitioningManager.mm in Sources */, - F6E2FDD91E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */, F6E2FF111E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */, 34C9BD021C6DB693000DC38D /* MWMTableViewController.mm in Sources */, F6E2FDFD1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDB1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, 34943BB61E26222300B14F84 /* WelcomeProtocol.swift in Sources */, - F6E2FDC11E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, F6E2FD5E1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF471E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, 349D1ACE1E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */, @@ -4727,6 +4743,7 @@ F6E2FE271E097BA00083EBEC /* MWMOpeningHoursSection.mm in Sources */, F6E2FE241E097BA00083EBEC /* MWMOpeningHoursModel.mm in Sources */, F6BD33811B62403B00F2CE18 /* MWMRoutePreview.mm in Sources */, + 34D3B0351E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */, F6E2FD8B1E097BA00083EBEC /* MWMNoMapsView.mm in Sources */, F6BB6CC31BB1860D00DF1DF2 /* MWMRoutePointLayout.mm in Sources */, 349D1AB71E2CB6E0004A2006 /* VisibleArea.swift in Sources */, @@ -4743,7 +4760,6 @@ 3486B50C1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, F6E2FEF91E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE421E097BA00083EBEC /* MWMDirectionView.mm in Sources */, - F6E2FDE21E097BA00083EBEC /* MWMNoteCell.mm in Sources */, F6E2FD551E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */, 349A357C1B53D4C9009677EE /* MWMCircularProgressView.mm in Sources */, 3465E7D81B6658C000854C4D /* MWMAPIBar.mm in Sources */, @@ -4778,6 +4794,7 @@ F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */, F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */, F6E2FE991E097BA00083EBEC /* MWMiPadPlacePageLayoutImpl.mm in Sources */, + 34D3B03B1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */, 349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */, 3454D7CD1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */, 3454D7DC1E07F045004AF2AD /* UISwitch+RuntimeAttributes.m in Sources */, @@ -4806,7 +4823,6 @@ F6E2FED81E097BA00083EBEC /* MWMSearchContentView.mm in Sources */, F6E2FD881E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */, 34BC72241B0DECAE0012A34B /* MWMMapViewControlsManager.mm in Sources */, - F6E2FDBB1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, F6E2FF4A1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, F6E2FE781E097BA00083EBEC /* MWMOpeningHoursLayoutHelper.mm in Sources */, F6BD1D201CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, @@ -4831,8 +4847,8 @@ F6E2FD911E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, F6F7787A1DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm in Sources */, F6E2FDA31E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, - F6E2FDD31E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 346EDADB1B9F0E35004F8DB5 /* MWMMultilineLabel.mm in Sources */, + 34D3B0291E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, 34D4FA621E26572D003F53EF /* FirstLaunchController.swift in Sources */, 34C9BD041C6DB693000DC38D /* MWMViewController.mm in Sources */, 340475701E081A4600C92850 /* MWMSettings.mm in Sources */, @@ -4841,6 +4857,7 @@ F6E2FEFC1E097BA00083EBEC /* MWMSearchCategoryCell.mm in Sources */, 3454D7CA1E07F045004AF2AD /* UIColor+MapsMeColor.mm in Sources */, 3454D7BE1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, + 34D3B0471E389D05004100F9 /* MWMNoteCell.mm in Sources */, F626D52E1C3E6CAA00C17D15 /* MWMTableViewCell.mm in Sources */, F6E2FE961E097BA00083EBEC /* ContextViews.mm in Sources */, F64F4B6D1B46A51F0081A24A /* MWMDownloaderDialogCell.mm in Sources */, @@ -4851,7 +4868,6 @@ 340475081E08199E00C92850 /* MWMMyTarget.mm in Sources */, F64F19A31AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm in Sources */, 3404754C1E081A4600C92850 /* MWMKeyboard.mm in Sources */, - F6E2FDA61E097BA00083EBEC /* MWMButtonCell.mm in Sources */, F6BD33841B6240F200F2CE18 /* MWMNavigationView.mm in Sources */, F6E2FE721E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, 34AB39C11D2BD8310021857D /* MWMStopButton.mm in Sources */, @@ -4888,7 +4904,6 @@ 34D3B04F1E38A20C004100F9 /* Bundle+Init.swift in Sources */, F67E751E1DB76DFC00D6741F /* MWMTaxiCollectionLayout.mm in Sources */, F6E2FF0C1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, - F6E2FDCE1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, F6E2FF541E097BA00083EBEC /* MWMHelpController.mm in Sources */, F6E2FF5A1E097BA00083EBEC /* MWMNightModeController.mm in Sources */, 6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */, @@ -4909,16 +4924,19 @@ 34F742321E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 340475811E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 6741A9B11BF340DE002C974C /* MWMAPIBarView.mm in Sources */, + 34D3B0211E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, 3486B51E1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, F6E2FE491E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 340475501E081A4600C92850 /* fabric_logging_ios.mm in Sources */, 6741A9B61BF340DE002C974C /* MWMTextToSpeech.mm in Sources */, F6E2FED01E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, 34D4FA671E265749003F53EF /* WhatsNewController.swift in Sources */, + 34D3B01B1E389D05004100F9 /* MWMButtonCell.mm in Sources */, 3486B5161E27AD3B0069C126 /* Framework.cpp in Sources */, 34ABA6291C2D567B00FE1BEC /* MWMInputLoginValidator.mm in Sources */, F6E2FF091E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD8F1E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, + 34D3B0421E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */, F6E2FE611E097BA00083EBEC /* MWMBookmarkCell.mm in Sources */, F6E2FEA31E097BA00083EBEC /* MWMPPView.mm in Sources */, 3454D7D11E07F045004AF2AD /* UIImage+RGBAData.mm in Sources */, @@ -4928,7 +4946,6 @@ 349D1ABC1E2D05EF004A2006 /* SearchBar.swift in Sources */, F6E2FD7A1E097BA00083EBEC /* MWMMapDownloaderDefaultDataSource.mm in Sources */, F6E2FF3F1E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */, - F6E2FDAD1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, 6741A9BA1BF340DE002C974C /* MWMRoutePointCell.m in Sources */, F6E2FDE01E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, 6741A9C01BF340DE002C974C /* MWMTextView.mm in Sources */, @@ -4943,6 +4960,7 @@ 3404757E1E081B3300C92850 /* iosOGLContext.mm in Sources */, F6E2FD5C1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, 34D3AFF21E37945B004100F9 /* UITableView+Cells.swift in Sources */, + 34D3B0301E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */, F653CE191C71F62700A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */, 340475621E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, F6E2FEE51E097BA00083EBEC /* MWMSearchNoResults.mm in Sources */, @@ -4961,12 +4979,11 @@ 34ABA6171C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */, 6741A9D41BF340DE002C974C /* MWMAlertViewController.mm in Sources */, F6E2FECD1E097BA00083EBEC /* MWMSearchFilterTransitioningManager.mm in Sources */, - F6E2FDDA1E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */, + 34D3B0181E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */, F6E2FF121E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */, F6FE3C391CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.mm in Sources */, F6E2FDFE1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDC1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, - F6E2FDC21E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, 34943BB71E26222300B14F84 /* WelcomeProtocol.swift in Sources */, F6E2FD5F1E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF481E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, @@ -4982,6 +4999,7 @@ F6E2FE251E097BA00083EBEC /* MWMOpeningHoursModel.mm in Sources */, 34C9BD031C6DB693000DC38D /* MWMTableViewController.mm in Sources */, F6E2FD8C1E097BA00083EBEC /* MWMNoMapsView.mm in Sources */, + 34D3B0361E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */, 6741A9DB1BF340DE002C974C /* MWMRoutePreview.mm in Sources */, 6741A9DC1BF340DE002C974C /* MWMRoutePointLayout.mm in Sources */, 349D1AB81E2CB6E0004A2006 /* VisibleArea.swift in Sources */, @@ -4997,7 +5015,6 @@ F6E2FEFA1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE431E097BA00083EBEC /* MWMDirectionView.mm in Sources */, 3486B50D1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, - F6E2FDE31E097BA00083EBEC /* MWMNoteCell.mm in Sources */, F6E2FD561E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */, 3462258F1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm in Sources */, 6741A9E71BF340DE002C974C /* MWMCircularProgressView.mm in Sources */, @@ -5033,6 +5050,7 @@ F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */, F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */, F6E2FE9A1E097BA00083EBEC /* MWMiPadPlacePageLayoutImpl.mm in Sources */, + 34D3B03C1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */, 6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */, 3454D7CE1E07F045004AF2AD /* UIFont+MapsMeFonts.mm in Sources */, 349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */, @@ -5061,7 +5079,6 @@ F6E2FED91E097BA00083EBEC /* MWMSearchContentView.mm in Sources */, F6E2FD891E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */, F6BD1D211CA412920047B8E8 /* MWMOsmAuthAlert.mm in Sources */, - F6E2FDBC1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, F6E2FF4B1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, F6E2FE791E097BA00083EBEC /* MWMOpeningHoursLayoutHelper.mm in Sources */, F6B97B271CD0CA990009B612 /* MWMBookmarkNameCell.mm in Sources */, @@ -5086,8 +5103,8 @@ F6E2FD921E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, 34C9BD051C6DB693000DC38D /* MWMViewController.mm in Sources */, F6E2FDA41E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, - F6E2FDD41E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 3454D7CB1E07F045004AF2AD /* UIColor+MapsMeColor.mm in Sources */, + 34D3B02A1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, 340475711E081A4600C92850 /* MWMSettings.mm in Sources */, 34D4FA631E26572D003F53EF /* FirstLaunchController.swift in Sources */, 3404756E1E081A4600C92850 /* MWMSearch.mm in Sources */, @@ -5096,6 +5113,7 @@ 3486B5081E27A4B50069C126 /* LocalNotificationManager.mm in Sources */, 3454D7BF1E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.mm in Sources */, + 34D3B0481E389D05004100F9 /* MWMNoteCell.mm in Sources */, F6E2FE971E097BA00083EBEC /* ContextViews.mm in Sources */, 6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */, 340475771E081A4600C92850 /* MWMTrafficManager.mm in Sources */, @@ -5143,7 +5161,6 @@ 34D3B0501E38A20C004100F9 /* Bundle+Init.swift in Sources */, 3454D7D51E07F045004AF2AD /* UIImageView+Coloring.mm in Sources */, F6E2FF0D1E097BA00083EBEC /* MWMSearchHistoryMyPositionCell.mm in Sources */, - F6E2FDCF1E097BA00083EBEC /* MWMEditorSelectTableViewCell.mm in Sources */, F6E2FF551E097BA00083EBEC /* MWMHelpController.mm in Sources */, F6E2FF5B1E097BA00083EBEC /* MWMNightModeController.mm in Sources */, 849CF6841DE842290024A8A5 /* MWMShareActivityItem.mm in Sources */, @@ -5164,16 +5181,19 @@ 34F742331E0834F400AC1FD6 /* UIViewController+Navigation.mm in Sources */, 849CF6911DE842290024A8A5 /* MWMSideButtons.mm in Sources */, 849CF6971DE842290024A8A5 /* MapsAppDelegate.mm in Sources */, + 34D3B0221E389D05004100F9 /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, 3486B51F1E27AD590069C126 /* MWMFrameworkHelper.mm in Sources */, F6E2FE4A1E097BA00083EBEC /* MWMPlacePageData.mm in Sources */, 849CF6981DE842290024A8A5 /* MWMAPIBarView.mm in Sources */, 849CF69D1DE842290024A8A5 /* MWMInputLoginValidator.mm in Sources */, F6E2FED11E097BA00083EBEC /* MWMSearchFilterViewController.mm in Sources */, 34D4FA681E265749003F53EF /* WhatsNewController.swift in Sources */, + 34D3B01C1E389D05004100F9 /* MWMButtonCell.mm in Sources */, 3486B5171E27AD3B0069C126 /* Framework.cpp in Sources */, 849CF69E1DE842290024A8A5 /* MWMTextToSpeech.mm in Sources */, F6E2FF0A1E097BA00083EBEC /* MWMSearchHistoryManager.mm in Sources */, F6E2FD901E097BA00083EBEC /* MWMNoMapsViewController.mm in Sources */, + 34D3B0431E389D05004100F9 /* MWMEditorTextTableViewCell.mm in Sources */, F6E2FE621E097BA00083EBEC /* MWMBookmarkCell.mm in Sources */, F6E2FEA41E097BA00083EBEC /* MWMPPView.mm in Sources */, 849CF69F1DE842290024A8A5 /* MWMStartButton.mm in Sources */, @@ -5183,7 +5203,6 @@ 349D1ABD1E2D05EF004A2006 /* SearchBar.swift in Sources */, F6E2FD7B1E097BA00083EBEC /* MWMMapDownloaderDefaultDataSource.mm in Sources */, F6E2FF401E097BA00083EBEC /* MWMSearchTableViewController.mm in Sources */, - F6E2FDAE1E097BA00083EBEC /* MWMEditorAddAdditionalNameTableViewCell.mm in Sources */, 849CF6A41DE842290024A8A5 /* MWMRateAlert.mm in Sources */, F6E2FDE11E097BA00083EBEC /* MWMEditorViewController.mm in Sources */, F6E2FDB71E097BA00083EBEC /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -5198,6 +5217,7 @@ F6E2FE4D1E097BA00083EBEC /* MWMPlacePageManager.mm in Sources */, 340475631E081A4600C92850 /* MWMNetworkPolicy.mm in Sources */, 34D3AFF31E37945B004100F9 /* UITableView+Cells.swift in Sources */, + 34D3B0311E389D05004100F9 /* MWMEditorCategoryCell.mm in Sources */, F6E2FD5D1E097BA00083EBEC /* MWMMapDownloaderCellHeader.mm in Sources */, 3454D7DB1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm in Sources */, 3454D7BD1E07F045004AF2AD /* CLLocation+Mercator.mm in Sources */, @@ -5216,15 +5236,14 @@ 3454D7CC1E07F045004AF2AD /* UIColor+MapsMeColor.mm in Sources */, F6E2FE561E097BA00083EBEC /* MWMPlacePageActionBar.mm in Sources */, 849CF6CF1DE842290024A8A5 /* MWMAlertViewController.mm in Sources */, + 34D3B0191E389D05004100F9 /* EditorAdditionalNamePlaceholderTableViewCell.swift in Sources */, 340475781E081A4600C92850 /* MWMTrafficManager.mm in Sources */, F6E2FECE1E097BA00083EBEC /* MWMSearchFilterTransitioningManager.mm in Sources */, - F6E2FDDB1E097BA00083EBEC /* MWMEditorTextTableViewCell.mm in Sources */, F6E2FF131E097BA00083EBEC /* MWMSearchHistoryRequestCell.mm in Sources */, 849CF6D21DE842290024A8A5 /* MWMNavigationController.mm in Sources */, F6E2FDFF1E097BA00083EBEC /* MWMOpeningHoursClosedSpanTableViewCell.mm in Sources */, F6E2FEDD1E097BA00083EBEC /* MWMSearchManager+Filter.mm in Sources */, 34943BB81E26222300B14F84 /* WelcomeProtocol.swift in Sources */, - F6E2FDC31E097BA00083EBEC /* MWMEditorCategoryCell.mm in Sources */, F6E2FD601E097BA00083EBEC /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, F6E2FF491E097BA00083EBEC /* SettingsTableViewSelectableCell.swift in Sources */, 349D1AD01E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */, @@ -5237,6 +5256,7 @@ F6E2FE291E097BA00083EBEC /* MWMOpeningHoursSection.mm in Sources */, 849CF6D31DE842290024A8A5 /* MWMMapDownloadDialog.mm in Sources */, F6E2FE261E097BA00083EBEC /* MWMOpeningHoursModel.mm in Sources */, + 34D3B0371E389D05004100F9 /* MWMEditorSelectTableViewCell.mm in Sources */, 849CF6D51DE842290024A8A5 /* MWMTableViewController.mm in Sources */, F6E2FD8D1E097BA00083EBEC /* MWMNoMapsView.mm in Sources */, 349D1AB91E2CB6E0004A2006 /* VisibleArea.swift in Sources */, @@ -5253,7 +5273,6 @@ 3486B50E1E27A6DA0069C126 /* MWMPushNotifications.mm in Sources */, F6E2FEFB1E097BA00083EBEC /* MWMSearchCategoriesManager.mm in Sources */, F6E2FE441E097BA00083EBEC /* MWMDirectionView.mm in Sources */, - F6E2FDE41E097BA00083EBEC /* MWMNoteCell.mm in Sources */, F6E2FD571E097BA00083EBEC /* MWMMapDownloaderButtonTableViewCell.mm in Sources */, 340475751E081A4600C92850 /* MWMStorage.mm in Sources */, 849CF6E11DE842290024A8A5 /* MWMDownloaderDialogHeader.mm in Sources */, @@ -5288,6 +5307,7 @@ 849CF6FC1DE842290024A8A5 /* MWMSideButtonsView.mm in Sources */, 3454D7C01E07F045004AF2AD /* DateComponentsFormatter+ETA.swift in Sources */, F6E2FE9B1E097BA00083EBEC /* MWMiPadPlacePageLayoutImpl.mm in Sources */, + 34D3B03D1E389D05004100F9 /* MWMEditorSwitchTableViewCell.mm in Sources */, 849CF7071DE842290024A8A5 /* LocaleTranslator.mm in Sources */, 340475821E081B3300C92850 /* iosOGLContextFactory.mm in Sources */, 849CF70A1DE842290024A8A5 /* MWMTaxiPreviewDataSource.mm in Sources */, @@ -5316,7 +5336,6 @@ 3454D7C91E07F045004AF2AD /* UIButton+RuntimeAttributes.mm in Sources */, F6E2FEDA1E097BA00083EBEC /* MWMSearchContentView.mm in Sources */, F6E2FD8A1E097BA00083EBEC /* MWMMapDownloaderViewController.mm in Sources */, - F6E2FDBD1E097BA00083EBEC /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, F6E2FF4C1E097BA00083EBEC /* SettingsTableViewSwitchCell.swift in Sources */, F6E2FE7A1E097BA00083EBEC /* MWMOpeningHoursLayoutHelper.mm in Sources */, 849CF7251DE842290024A8A5 /* MWMMapViewControlsManager.mm in Sources */, @@ -5340,9 +5359,9 @@ F6E2FD931E097BA00083EBEC /* MWMBookmarkColorViewController.mm in Sources */, 849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */, F6E2FDA51E097BA00083EBEC /* MWMCuisineEditorViewController.mm in Sources */, - F6E2FDD51E097BA00083EBEC /* MWMEditorSwitchTableViewCell.mm in Sources */, 3454D7C31E07F045004AF2AD /* NSString+Categories.mm in Sources */, 34D4FA641E26572D003F53EF /* FirstLaunchController.swift in Sources */, + 34D3B02B1E389D05004100F9 /* MWMEditorAdditionalNameTableViewCell.mm in Sources */, 849CF7371DE842290024A8A5 /* MWMTaxiCollectionLayout.mm in Sources */, 3454D7C61E07F045004AF2AD /* UIButton+Orientation.mm in Sources */, 340475571E081A4600C92850 /* Statistics.mm in Sources */, @@ -5351,6 +5370,7 @@ 3404754B1E081A4600C92850 /* AppInfo.mm in Sources */, 849CF73C1DE842290024A8A5 /* MWMMultilineLabel.mm in Sources */, 849CF73D1DE842290024A8A5 /* MWMViewController.mm in Sources */, + 34D3B0491E389D05004100F9 /* MWMNoteCell.mm in Sources */, F6E2FE981E097BA00083EBEC /* ContextViews.mm in Sources */, 349B926E1DF0518E007779DD /* MWMToast.mm in Sources */, 849CF7461DE842290024A8A5 /* MWMTableViewCell.mm in Sources */, @@ -5361,7 +5381,6 @@ 340475541E081A4600C92850 /* MWMCustomFacebookEvents.mm in Sources */, 3404750A1E08199E00C92850 /* MWMMyTarget.mm in Sources */, 849CF7561DE842290024A8A5 /* MWMRoutingDisclaimerAlert.mm in Sources */, - F6E2FDA81E097BA00083EBEC /* MWMButtonCell.mm in Sources */, 849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */, F6E2FE741E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, 3454D7E71E07F045004AF2AD /* UIView+RuntimeAttributes.mm in Sources */, diff --git a/iphone/Maps/UI/EditBookmark/MWMBookmarkColorViewController.mm b/iphone/Maps/UI/EditBookmark/MWMBookmarkColorViewController.mm index cf9c072069..e59c5b985f 100644 --- a/iphone/Maps/UI/EditBookmark/MWMBookmarkColorViewController.mm +++ b/iphone/Maps/UI/EditBookmark/MWMBookmarkColorViewController.mm @@ -1,5 +1,6 @@ #import "MWMBookmarkColorViewController.h" #import "Statistics.h" +#import "SwiftBridge.h" #import "UIViewController+Navigation.h" #include "std/array.hpp" @@ -55,7 +56,8 @@ array const kBookmarkColorsVariant - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + auto cell = + [tableView dequeueReusableCellWithCellClass:[UITableViewCell class] indexPath:indexPath]; NSString * currentColor = kBookmarkColorsVariant[indexPath.row]; cell.textLabel.text = ios_bookmark_ui_helper::LocalizedTitleForBookmarkColor(currentColor); BOOL const isSelected = [currentColor isEqualToString:self.bookmarkColor]; diff --git a/iphone/Maps/UI/EditBookmark/MWMEditBookmarkController.mm b/iphone/Maps/UI/EditBookmark/MWMEditBookmarkController.mm index 4229527a83..2ac8e0d9d1 100644 --- a/iphone/Maps/UI/EditBookmark/MWMEditBookmarkController.mm +++ b/iphone/Maps/UI/EditBookmark/MWMEditBookmarkController.mm @@ -80,16 +80,10 @@ enum RowInMetaInfo - (void)registerCells { - auto registerClass = ^ (Class c) - { - NSString * className = NSStringFromClass(c); - [self.tableView registerNib:[UINib nibWithNibName:className bundle:nil] - forCellReuseIdentifier:className]; - }; - - registerClass([MWMButtonCell class]); - registerClass([MWMBookmarkTitleCell class]); - registerClass([MWMNoteCell class]); + UITableView * tv = self.tableView; + [tv registerWithCellClass:[MWMButtonCell class]]; + [tv registerWithCellClass:[MWMBookmarkTitleCell class]]; + [tv registerWithCellClass:[MWMNoteCell class]]; } - (void)onSave @@ -147,13 +141,16 @@ enum RowInMetaInfo { case Title: { - MWMBookmarkTitleCell * cell = [tableView dequeueReusableCellWithIdentifier:[MWMBookmarkTitleCell className]]; + Class cls = [MWMBookmarkTitleCell class]; + auto cell = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configureWithName:self.cachedTitle delegate:self]; return cell; } case Color: { - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + Class cls = [UITableViewCell class]; + auto cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; cell.textLabel.text = ios_bookmark_ui_helper::LocalizedTitleForBookmarkColor(self.cachedColor); cell.imageView.image = ios_bookmark_ui_helper::ImageForBookmarkColor(self.cachedColor, YES); cell.imageView.layer.cornerRadius = cell.imageView.width / 2; @@ -162,7 +159,8 @@ enum RowInMetaInfo } case Category: { - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + Class cls = [UITableViewCell class]; + auto cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; cell.textLabel.text = self.cachedCategory; cell.imageView.image = [UIImage imageNamed:@"ic_folder"]; cell.imageView.mwm_coloring = MWMImageColoringBlack; @@ -182,7 +180,9 @@ enum RowInMetaInfo } else { - self.cachedNote = [tableView dequeueReusableCellWithIdentifier:[MWMNoteCell className]]; + Class cls = [MWMNoteCell class]; + self.cachedNote = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [self.cachedNote configWithDelegate:self noteText:self.cachedDescription placeholder:L(@"placepage_personal_notes_hint")]; return self.cachedNote; @@ -191,7 +191,9 @@ enum RowInMetaInfo case Delete: { NSAssert(indexPath.row == 0, @"Incorrect row!"); - MWMButtonCell * cell = [tableView dequeueReusableCellWithIdentifier:[MWMButtonCell className]]; + Class cls = [MWMButtonCell class]; + auto cell = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configureWithDelegate:self title:L(@"placepage_delete_bookmark_button")]; return cell; } diff --git a/iphone/Maps/UI/Editor/Cells/EditorAdditionalNamePlaceholderTableViewCell.swift b/iphone/Maps/UI/Editor/Cells/EditorAdditionalNamePlaceholderTableViewCell.swift new file mode 100644 index 0000000000..bb4ba10dbf --- /dev/null +++ b/iphone/Maps/UI/Editor/Cells/EditorAdditionalNamePlaceholderTableViewCell.swift @@ -0,0 +1,3 @@ +@objc(MWMEditorAdditionalNamePlaceholderTableViewCell) +final class EditorAdditionalNamePlaceholderTableViewCell: MWMTableViewCell { +} diff --git a/iphone/Maps/UI/Editor/MWMButtonCell.h b/iphone/Maps/UI/Editor/Cells/MWMButtonCell.h similarity index 83% rename from iphone/Maps/UI/Editor/MWMButtonCell.h rename to iphone/Maps/UI/Editor/Cells/MWMButtonCell.h index 816e7148fc..1529cf9ab0 100644 --- a/iphone/Maps/UI/Editor/MWMButtonCell.h +++ b/iphone/Maps/UI/Editor/Cells/MWMButtonCell.h @@ -1,6 +1,6 @@ #import "MWMTableViewCell.h" -@protocol MWMButtonCellDelegate +@protocol MWMButtonCellDelegate - (void)cellSelect:(UITableViewCell *)cell; diff --git a/iphone/Maps/UI/Editor/MWMButtonCell.mm b/iphone/Maps/UI/Editor/Cells/MWMButtonCell.mm similarity index 60% rename from iphone/Maps/UI/Editor/MWMButtonCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMButtonCell.mm index c472091ea3..c0a1b59738 100644 --- a/iphone/Maps/UI/Editor/MWMButtonCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMButtonCell.mm @@ -2,8 +2,8 @@ @interface MWMButtonCell () -@property (weak, nonatomic) IBOutlet UIButton * button; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) IBOutlet UIButton * button; +@property(weak, nonatomic) id delegate; @end @@ -15,9 +15,5 @@ self.delegate = delegate; } -- (IBAction)buttonTap -{ - [self.delegate cellSelect:self]; -} - +- (IBAction)buttonTap { [self.delegate cellSelect:self]; } @end diff --git a/iphone/Maps/UI/Editor/MWMButtonCell.xib b/iphone/Maps/UI/Editor/Cells/MWMButtonCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMButtonCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMButtonCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.h similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.h diff --git a/iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.mm similarity index 56% rename from iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.mm index 4660a3b2b1..52278a1b54 100644 --- a/iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.mm @@ -2,20 +2,12 @@ @interface MWMEditorAddAdditionalNameTableViewCell () -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) id delegate; @end @implementation MWMEditorAddAdditionalNameTableViewCell -- (void)configWithDelegate:(id)delegate -{ - self.delegate = delegate; -} - -- (IBAction)addLanguageTap -{ - [self.delegate editAdditionalNameLanguage:NSNotFound]; -} - +- (void)configWithDelegate:(id)delegate { self.delegate = delegate; } +- (IBAction)addLanguageTap { [self.delegate editAdditionalNameLanguage:NSNotFound]; } @end diff --git a/iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorAddAdditionalNameTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorAddAdditionalNameTableViewCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorAdditionalNamePlaceholderTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNamePlaceholderTableViewCell.xib similarity index 75% rename from iphone/Maps/UI/Editor/MWMEditorAdditionalNamePlaceholderTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNamePlaceholderTableViewCell.xib index d8ae39383d..2deb595a06 100644 --- a/iphone/Maps/UI/Editor/MWMEditorAdditionalNamePlaceholderTableViewCell.xib +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNamePlaceholderTableViewCell.xib @@ -1,28 +1,32 @@ - - + + + + + - + + - + - + - - + + - + diff --git a/iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.h similarity index 90% rename from iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.h index c4b73e47ea..0c7fae91e5 100644 --- a/iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.h +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.h @@ -5,7 +5,7 @@ @interface MWMEditorAdditionalNameTableViewCell : MWMTableViewCell -@property (nonatomic, readonly) NSInteger code; +@property(nonatomic, readonly) NSInteger code; - (void)configWithDelegate:(id)delegate langCode:(NSInteger)langCode diff --git a/iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.mm similarity index 70% rename from iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.mm index c8265ee680..70d459c1e4 100644 --- a/iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.mm @@ -2,13 +2,13 @@ @interface MWMEditorAdditionalNameTableViewCell () -@property (weak, nonatomic) IBOutlet UILabel * languageLabel; -@property (weak, nonatomic) IBOutlet UIButton * languageButton; -@property (weak, nonatomic) IBOutlet UITextField * textField; +@property(weak, nonatomic) IBOutlet UILabel * languageLabel; +@property(weak, nonatomic) IBOutlet UIButton * languageButton; +@property(weak, nonatomic) IBOutlet UITextField * textField; -@property (nonatomic, readwrite) NSInteger code; +@property(nonatomic, readwrite) NSInteger code; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) id delegate; @end @@ -28,11 +28,7 @@ self.textField.keyboardType = keyboardType; } -- (IBAction)changeLanguageTap -{ - [self.delegate editAdditionalNameLanguage:self.code]; -} - +- (IBAction)changeLanguageTap { [self.delegate editAdditionalNameLanguage:self.code]; } #pragma mark - UITextFieldDelegate - (void)textFieldDidEndEditing:(UITextField *)textField diff --git a/iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorAdditionalNameTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorAdditionalNameTableViewCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorCategoryCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.h similarity index 65% rename from iphone/Maps/UI/Editor/MWMEditorCategoryCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.h index 7fd6c4884f..fb43843e66 100644 --- a/iphone/Maps/UI/Editor/MWMEditorCategoryCell.h +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.h @@ -4,6 +4,8 @@ @interface MWMEditorCategoryCell : MWMTableViewCell -- (void)configureWithDelegate:(id)delegate detailTitle:(NSString *)detail isCreating:(BOOL)isCreating; +- (void)configureWithDelegate:(id)delegate + detailTitle:(NSString *)detail + isCreating:(BOOL)isCreating; @end diff --git a/iphone/Maps/UI/Editor/MWMEditorCategoryCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.mm similarity index 64% rename from iphone/Maps/UI/Editor/MWMEditorCategoryCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.mm index c49364b640..8a1cde598b 100644 --- a/iphone/Maps/UI/Editor/MWMEditorCategoryCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.mm @@ -4,21 +4,23 @@ namespace { - CGFloat const kDetailShortRightSpace = 16; -} // namespace +CGFloat const kDetailShortRightSpace = 16; +} // namespace @interface MWMEditorCategoryCell () -@property (weak, nonatomic) IBOutlet UIImageView * accessoryIcon; -@property (weak, nonatomic) IBOutlet UILabel * detail; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint * detailRightSpace; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) IBOutlet UIImageView * accessoryIcon; +@property(weak, nonatomic) IBOutlet UILabel * detail; +@property(weak, nonatomic) IBOutlet NSLayoutConstraint * detailRightSpace; +@property(weak, nonatomic) id delegate; @end @implementation MWMEditorCategoryCell -- (void)configureWithDelegate:(id)delegate detailTitle:(NSString *)detail isCreating:(BOOL)isCreating +- (void)configureWithDelegate:(id)delegate + detailTitle:(NSString *)detail + isCreating:(BOOL)isCreating { self.delegate = delegate; self.detail.text = detail; diff --git a/iphone/Maps/UI/Editor/MWMEditorCategoryCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorCategoryCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorCategoryCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.h similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.h diff --git a/iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.mm similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.mm diff --git a/iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorSelectTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorSelectTableViewCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.h similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.h diff --git a/iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.mm similarity index 78% rename from iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.mm index 613c55f689..4510bea8d6 100644 --- a/iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.mm @@ -3,11 +3,11 @@ @interface MWMEditorSwitchTableViewCell () -@property (weak, nonatomic) IBOutlet UIImageView * icon; -@property (weak, nonatomic) IBOutlet UILabel * label; -@property (weak, nonatomic) IBOutlet UISwitch * switchControl; +@property(weak, nonatomic) IBOutlet UIImageView * icon; +@property(weak, nonatomic) IBOutlet UILabel * label; +@property(weak, nonatomic) IBOutlet UISwitch * switchControl; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) id delegate; @end diff --git a/iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorSwitchTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorSwitchTableViewCell.xib diff --git a/iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.h b/iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.h similarity index 92% rename from iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.h rename to iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.h index 7f2c2467bb..830c10176d 100644 --- a/iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.h +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.h @@ -20,6 +20,6 @@ keyboardType:(UIKeyboardType)keyboardType capitalization:(UITextAutocapitalizationType)capitalization; -@property (weak, nonatomic, readonly) IBOutlet UITextField * textField; +@property(weak, nonatomic, readonly) IBOutlet UITextField * textField; @end diff --git a/iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.mm b/iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.mm similarity index 65% rename from iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.mm index b80efdefa6..6cb7a04d73 100644 --- a/iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.mm @@ -1,25 +1,25 @@ -#import "MWMEditorCommon.h" #import "MWMEditorTextTableViewCell.h" +#import "MWMEditorCommon.h" #import "UIImageView+Coloring.h" #import "UITextField+RuntimeAttributes.h" namespace { - CGFloat const kErrorLabelDefaultTopSpace = 4.; -} // namespace +CGFloat const kErrorLabelDefaultTopSpace = 4.; +} // namespace -@interface MWMEditorTextTableViewCell () +@interface MWMEditorTextTableViewCell () -@property (weak, nonatomic) IBOutlet UIImageView * icon; -@property (weak, nonatomic, readwrite) IBOutlet UITextField * textField; -@property (weak, nonatomic) IBOutlet UILabel * errorLabel; +@property(weak, nonatomic) IBOutlet UIImageView * icon; +@property(weak, nonatomic, readwrite) IBOutlet UITextField * textField; +@property(weak, nonatomic) IBOutlet UILabel * errorLabel; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint * errorLabelTopSpace; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint * labelHeight; +@property(weak, nonatomic) IBOutlet NSLayoutConstraint * errorLabelTopSpace; +@property(weak, nonatomic) IBOutlet NSLayoutConstraint * labelHeight; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) id delegate; -@property (nonatomic) BOOL isValid; +@property(nonatomic) BOOL isValid; @end @@ -30,10 +30,16 @@ namespace text:(NSString *)text placeholder:(NSString *)placeholder keyboardType:(UIKeyboardType)keyboardType - capitalization:(UITextAutocapitalizationType)capitalization + capitalization:(UITextAutocapitalizationType)capitalization { - [self configWithDelegate:delegate icon:icon text:text placeholder:placeholder - errorMessage:nil isValid:YES keyboardType:keyboardType capitalization:capitalization]; + [self configWithDelegate:delegate + icon:icon + text:text + placeholder:placeholder + errorMessage:nil + isValid:YES + keyboardType:keyboardType + capitalization:capitalization]; } - (void)configWithDelegate:(id)delegate @@ -43,7 +49,7 @@ namespace errorMessage:(NSString *)errorMessage isValid:(BOOL)isValid keyboardType:(UIKeyboardType)keyboardType - capitalization:(UITextAutocapitalizationType)capitalization + capitalization:(UITextAutocapitalizationType)capitalization { self.delegate = delegate; self.icon.image = icon; @@ -51,8 +57,9 @@ namespace self.icon.hidden = (icon == nil); self.textField.text = text; - self.textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes: - @{NSForegroundColorAttributeName : [UIColor blackHintText]}]; + self.textField.attributedPlaceholder = [[NSAttributedString alloc] + initWithString:placeholder + attributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]}]; self.errorLabel.text = errorMessage; self.textField.keyboardType = keyboardType; self.textField.backgroundColor = [UIColor clearColor]; @@ -89,7 +96,9 @@ namespace #pragma mark - UITextFieldDelegate -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string +- (BOOL)textField:(UITextField *)textField + shouldChangeCharactersInRange:(NSRange)range + replacementString:(NSString *)string { [self changeInvalidCellState]; return YES; diff --git a/iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.xib b/iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMEditorTextTableViewCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMEditorTextTableViewCell.xib diff --git a/iphone/Maps/UI/Editor/MWMNoteCell.h b/iphone/Maps/UI/Editor/Cells/MWMNoteCell.h similarity index 76% rename from iphone/Maps/UI/Editor/MWMNoteCell.h rename to iphone/Maps/UI/Editor/Cells/MWMNoteCell.h index b087532883..44d32b53e3 100644 --- a/iphone/Maps/UI/Editor/MWMNoteCell.h +++ b/iphone/Maps/UI/Editor/Cells/MWMNoteCell.h @@ -2,7 +2,7 @@ @class MWMNoteCell; -@protocol MWMNoteCelLDelegate +@protocol MWMNoteCelLDelegate - (void)cellShouldChangeSize:(MWMNoteCell *)cell text:(NSString *)text; - (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text; @@ -11,7 +11,8 @@ @interface MWMNoteCell : MWMTableViewCell -- (void)configWithDelegate:(id)delegate noteText:(NSString *)text +- (void)configWithDelegate:(id)delegate + noteText:(NSString *)text placeholder:(NSString *)placeholder; - (CGFloat)cellHeight; - (void)updateTextViewForHeight:(CGFloat)height; diff --git a/iphone/Maps/UI/Editor/MWMNoteCell.mm b/iphone/Maps/UI/Editor/Cells/MWMNoteCell.mm similarity index 64% rename from iphone/Maps/UI/Editor/MWMNoteCell.mm rename to iphone/Maps/UI/Editor/Cells/MWMNoteCell.mm index 8054435915..ada881b49f 100644 --- a/iphone/Maps/UI/Editor/MWMNoteCell.mm +++ b/iphone/Maps/UI/Editor/Cells/MWMNoteCell.mm @@ -1,19 +1,19 @@ -#import "MWMTextView.h" #import "MWMNoteCell.h" +#import "MWMTextView.h" namespace { CGFloat const kTopTextViewOffset = 12.; NSString * const kTextViewContentSizeKeyPath = @"contentSize"; CGFloat const kMinimalTextViewHeight = 104.; - + } // namespace -@interface MWMNoteCell () +@interface MWMNoteCell () -@property (weak, nonatomic) IBOutlet MWMTextView * textView; -@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewHeight; -@property (weak, nonatomic) id delegate; +@property(weak, nonatomic) IBOutlet MWMTextView * textView; +@property(weak, nonatomic) IBOutlet NSLayoutConstraint * textViewHeight; +@property(weak, nonatomic) id delegate; @end @@ -21,12 +21,14 @@ static void * kContext = &kContext; @implementation MWMNoteCell -- (void)configWithDelegate:(id)delegate noteText:(NSString *)text +- (void)configWithDelegate:(id)delegate + noteText:(NSString *)text placeholder:(NSString *)placeholder { self.delegate = delegate; self.textView.text = text; - self.textView.keyboardAppearance = [UIColor isNightMode] ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault; + self.textView.keyboardAppearance = + [UIColor isNightMode] ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault; self.textView.placeholder = placeholder; } @@ -67,32 +69,16 @@ static void * kContext = &kContext; [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } -- (CGFloat)cellHeight -{ - return self.textViewHeight.constant + 2 * kTopTextViewOffset; -} - -- (CGFloat)textViewContentHeight -{ - return self.textView.contentSize.height; -} - -+ (CGFloat)minimalHeight -{ - return kMinimalTextViewHeight; -} - +- (CGFloat)cellHeight { return self.textViewHeight.constant + 2 * kTopTextViewOffset; } +- (CGFloat)textViewContentHeight { return self.textView.contentSize.height; } ++ (CGFloat)minimalHeight { return kMinimalTextViewHeight; } - (void)textViewDidEndEditing:(UITextView *)textView { [self.delegate cell:self didFinishEditingWithText:textView.text]; [self unregisterObserver]; } -- (void)textViewDidBeginEditing:(UITextView *)textView -{ - [self registerObserver]; -} - +- (void)textViewDidBeginEditing:(UITextView *)textView { [self registerObserver]; } - (void)unregisterObserver { [self.textView removeObserver:self forKeyPath:kTextViewContentSizeKeyPath context:kContext]; @@ -100,7 +86,10 @@ static void * kContext = &kContext; - (void)registerObserver { - [self.textView addObserver:self forKeyPath:kTextViewContentSizeKeyPath options:NSKeyValueObservingOptionNew context:kContext]; + [self.textView addObserver:self + forKeyPath:kTextViewContentSizeKeyPath + options:NSKeyValueObservingOptionNew + context:kContext]; } @end diff --git a/iphone/Maps/UI/Editor/MWMNoteCell.xib b/iphone/Maps/UI/Editor/Cells/MWMNoteCell.xib similarity index 100% rename from iphone/Maps/UI/Editor/MWMNoteCell.xib rename to iphone/Maps/UI/Editor/Cells/MWMNoteCell.xib diff --git a/iphone/Maps/UI/Editor/Cuisine/MWMCuisineEditorViewController.mm b/iphone/Maps/UI/Editor/Cuisine/MWMCuisineEditorViewController.mm index b3a623b26a..09d8b2a639 100644 --- a/iphone/Maps/UI/Editor/Cuisine/MWMCuisineEditorViewController.mm +++ b/iphone/Maps/UI/Editor/Cuisine/MWMCuisineEditorViewController.mm @@ -3,6 +3,7 @@ #import "MWMKeyboard.h" #import "MWMTableViewCell.h" #import "MWMToast.h" +#import "SwiftBridge.h" #include "indexer/cuisines.hpp" #include "indexer/search_string_utils.hpp" @@ -193,8 +194,8 @@ vector SliceKeys(vector> const & v) - (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath { - UITableViewCell * cell = - [self.tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + auto cell = + [tableView dequeueReusableCellWithCellClass:[UITableViewCell class] indexPath:indexPath]; NSInteger const index = indexPath.row; auto const & dataSource = [self dataSourceForSection:indexPath.section]; diff --git a/iphone/Maps/UI/Editor/MWMEditorViewController.mm b/iphone/Maps/UI/Editor/MWMEditorViewController.mm index a8d2dfcb47..28348937dc 100644 --- a/iphone/Maps/UI/Editor/MWMEditorViewController.mm +++ b/iphone/Maps/UI/Editor/MWMEditorViewController.mm @@ -22,6 +22,7 @@ #import "MWMStreetEditorViewController.h" #import "MapViewController.h" #import "Statistics.h" +#import "SwiftBridge.h" #import "UIViewController+Navigation.h" #include "std/algorithm.hpp" @@ -55,32 +56,32 @@ vector const kSectionAddressCellTypes{ vector const kSectionNoteCellTypes{MWMPlacePageCellTypeNote}; vector const kSectionButtonCellTypes{MWMPlacePageCellTypeReportButton}; -MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{ - {MWMPlacePageCellTypeCategory, "MWMEditorCategoryCell"}, - {MWMPlacePageCellTypeAdditionalName, "MWMEditorAdditionalNameTableViewCell"}, - {MWMPlacePageCellTypeAddAdditionalName, "MWMEditorAddAdditionalNameTableViewCell"}, +using MWMPlacePageCellTypeClassMap = map; +MWMPlacePageCellTypeClassMap const kCellType2Class{ + {MWMPlacePageCellTypeCategory, [MWMEditorCategoryCell class]}, + {MWMPlacePageCellTypeAdditionalName, [MWMEditorAdditionalNameTableViewCell class]}, + {MWMPlacePageCellTypeAddAdditionalName, [MWMEditorAddAdditionalNameTableViewCell class]}, {MWMPlacePageCellTypeAddAdditionalNamePlaceholder, - "MWMEditorAdditionalNamePlaceholderTableViewCell"}, - {MWMPlacePageCellTypeStreet, "MWMEditorSelectTableViewCell"}, - {MWMPlacePageCellTypeBuilding, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeZipCode, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeBuildingLevels, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeOpenHours, "MWMPlacePageOpeningHoursCell"}, - {MWMPlacePageCellTypePhoneNumber, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeWebsite, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeEmail, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeOperator, "MWMEditorTextTableViewCell"}, - {MWMPlacePageCellTypeCuisine, "MWMEditorSelectTableViewCell"}, - {MWMPlacePageCellTypeWiFi, "MWMEditorSwitchTableViewCell"}, - {MWMPlacePageCellTypeNote, "MWMNoteCell"}, - {MWMPlacePageCellTypeReportButton, "MWMButtonCell"}}; + [MWMEditorAdditionalNamePlaceholderTableViewCell class]}, + {MWMPlacePageCellTypeStreet, [MWMEditorSelectTableViewCell class]}, + {MWMPlacePageCellTypeBuilding, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeZipCode, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeBuildingLevels, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeOpenHours, [MWMPlacePageOpeningHoursCell class]}, + {MWMPlacePageCellTypePhoneNumber, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeWebsite, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeEmail, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeOperator, [MWMEditorTextTableViewCell class]}, + {MWMPlacePageCellTypeCuisine, [MWMEditorSelectTableViewCell class]}, + {MWMPlacePageCellTypeWiFi, [MWMEditorSwitchTableViewCell class]}, + {MWMPlacePageCellTypeNote, [MWMNoteCell class]}, + {MWMPlacePageCellTypeReportButton, [MWMButtonCell class]}}; -NSString * reuseIdentifier(MWMPlacePageCellType cellType) +Class cellClass(MWMPlacePageCellType cellType) { - auto const it = kCellType2ReuseIdentifier.find(cellType); - BOOL const haveCell = (it != kCellType2ReuseIdentifier.end()); - ASSERT(haveCell, ()); - return haveCell ? @(it->second.c_str()) : @""; + auto const it = kCellType2Class.find(cellType); + ASSERT(it != kCellType2Class.end(), ()); + return it->second; } void cleanupAdditionalLanguages(vector const & names, @@ -150,13 +151,7 @@ vector cellsForProperties(vector const & props void registerCellsForTableView(vector const & cells, UITableView * tv) { for (auto const c : cells) - { - NSString * identifier = reuseIdentifier(c); - if (UINib * nib = [UINib nibWithNibName:identifier bundle:nil]) - [tv registerNib:nib forCellReuseIdentifier:identifier]; - else - ASSERT(false, ("Incorrect cell")); - } + [tv registerWithCellClass:cellClass(c)]; } } // namespace @@ -166,7 +161,7 @@ void registerCellsForTableView(vector const & cells, UITab MWMStreetEditorProtocol, MWMObjectsCategorySelectorDelegate, MWMNoteCelLDelegate, MWMEditorAdditionalName, MWMButtonCellDelegate, MWMEditorAdditionalNamesProtocol> -@property(nonatomic) NSMutableDictionary * offscreenCells; +@property(nonatomic) NSMutableDictionary * offscreenCells; @property(nonatomic) NSMutableArray * invalidCells; @property(nonatomic) MWMEditorAdditionalNamesHeader * additionalNamesHeader; @property(nonatomic) MWMEditorNotesFooter * notesFooter; @@ -370,13 +365,13 @@ void registerCellsForTableView(vector const & cells, UITab #pragma mark - Offscreen cells -- (UITableViewCell *)offscreenCellForIdentifier:(NSString *)reuseIdentifier +- (UITableViewCell *)offscreenCellForClass:(Class)cls { - UITableViewCell * cell = self.offscreenCells[reuseIdentifier]; + auto cell = self.offscreenCells[cls]; if (!cell) { - cell = [[[NSBundle mainBundle] loadNibNamed:reuseIdentifier owner:nil options:nil] firstObject]; - self.offscreenCells[reuseIdentifier] = cell; + cell = [[[NSBundle mainBundle] loadWithViewClass:cls owner:nil options:nil] firstObject]; + self.offscreenCells[cls] = cell; } return cell; } @@ -451,9 +446,9 @@ void registerCellsForTableView(vector const & cells, UITab return m_cells[m_sections[indexPath.section]][indexPath.row]; } -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { - return reuseIdentifier([self cellTypeForIndexPath:indexPath]); + return cellClass([self cellTypeForIndexPath:indexPath]); } #pragma mark - Fill cells with data @@ -687,8 +682,8 @@ void registerCellsForTableView(vector const & cells, UITab - (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath { - NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath]; - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; + Class cls = [self cellClassForIndexPath:indexPath]; + auto cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; [self fillCell:cell atIndexPath:indexPath]; return cell; } @@ -708,9 +703,8 @@ void registerCellsForTableView(vector const & cells, UITab - (CGFloat)tableView:(UITableView * _Nonnull)tableView heightForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath { - NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath]; - - UITableViewCell * cell = [self offscreenCellForIdentifier:reuseIdentifier]; + Class cls = [self cellClassForIndexPath:indexPath]; + auto cell = [self offscreenCellForClass:cls]; [self fillCell:cell atIndexPath:indexPath]; MWMPlacePageCellType const cellType = [self cellTypeForIndexPath:indexPath]; switch (cellType) @@ -821,7 +815,7 @@ void registerCellsForTableView(vector const & cells, UITab - (void)cellShouldChangeSize:(MWMNoteCell *)cell text:(NSString *)text { - self.offscreenCells[reuseIdentifier(MWMPlacePageCellTypeNote)] = cell; + self.offscreenCells[cellClass(MWMPlacePageCellTypeNote)] = cell; self.note = text; [self.tableView refresh]; NSIndexPath * ip = [self.tableView indexPathForCell:cell]; diff --git a/iphone/Maps/UI/Editor/MWMObjectsCategorySelectorController.mm b/iphone/Maps/UI/Editor/MWMObjectsCategorySelectorController.mm index f21c97f806..b3ab59930c 100644 --- a/iphone/Maps/UI/Editor/MWMObjectsCategorySelectorController.mm +++ b/iphone/Maps/UI/Editor/MWMObjectsCategorySelectorController.mm @@ -6,6 +6,7 @@ #import "MWMTableViewCell.h" #import "MWMToast.h" #import "Statistics.h" +#import "SwiftBridge.h" #import "UIViewController+Navigation.h" #include "LocaleTranslator.h" @@ -171,8 +172,8 @@ string locale() - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell * cell = - [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + auto cell = + [tableView dequeueReusableCellWithCellClass:[UITableViewCell class] indexPath:indexPath]; cell.textLabel.text = @([self dataSourceForSection:indexPath.section][indexPath.row].first.c_str()); if ([indexPath isEqual:self.selectedIndexPath]) diff --git a/iphone/Maps/UI/Editor/OpeningHours/MWMOpeningHoursEditorViewController.mm b/iphone/Maps/UI/Editor/OpeningHours/MWMOpeningHoursEditorViewController.mm index e5c0e3136f..b0e3c95f14 100644 --- a/iphone/Maps/UI/Editor/OpeningHours/MWMOpeningHoursEditorViewController.mm +++ b/iphone/Maps/UI/Editor/OpeningHours/MWMOpeningHoursEditorViewController.mm @@ -1,18 +1,26 @@ #import "MWMOpeningHoursEditorViewController.h" +#import "MWMOpeningHoursAddClosedTableViewCell.h" #import "MWMOpeningHoursAddScheduleTableViewCell.h" +#import "MWMOpeningHoursAllDayTableViewCell.h" +#import "MWMOpeningHoursClosedSpanTableViewCell.h" +#import "MWMOpeningHoursDaysSelectorTableViewCell.h" +#import "MWMOpeningHoursDeleteScheduleTableViewCell.h" #import "MWMOpeningHoursModel.h" #import "MWMOpeningHoursSection.h" +#import "MWMOpeningHoursTimeSelectorTableViewCell.h" +#import "MWMOpeningHoursTimeSpanTableViewCell.h" #import "MWMTextView.h" +#import "SwiftBridge.h" extern NSDictionary * const kMWMOpeningHoursEditorTableCells = @{ - @(MWMOpeningHoursEditorDaysSelectorCell) : @"MWMOpeningHoursDaysSelectorTableViewCell", - @(MWMOpeningHoursEditorAllDayCell) : @"MWMOpeningHoursAllDayTableViewCell", - @(MWMOpeningHoursEditorTimeSpanCell) : @"MWMOpeningHoursTimeSpanTableViewCell", - @(MWMOpeningHoursEditorTimeSelectorCell) : @"MWMOpeningHoursTimeSelectorTableViewCell", - @(MWMOpeningHoursEditorClosedSpanCell) : @"MWMOpeningHoursClosedSpanTableViewCell", - @(MWMOpeningHoursEditorAddClosedCell) : @"MWMOpeningHoursAddClosedTableViewCell", - @(MWMOpeningHoursEditorDeleteScheduleCell) : @"MWMOpeningHoursDeleteScheduleTableViewCell", - @(MWMOpeningHoursEditorAddScheduleCell) : @"MWMOpeningHoursAddScheduleTableViewCell", + @(MWMOpeningHoursEditorDaysSelectorCell) : [MWMOpeningHoursDaysSelectorTableViewCell class], + @(MWMOpeningHoursEditorAllDayCell) : [MWMOpeningHoursAllDayTableViewCell class], + @(MWMOpeningHoursEditorTimeSpanCell) : [MWMOpeningHoursTimeSpanTableViewCell class], + @(MWMOpeningHoursEditorTimeSelectorCell) : [MWMOpeningHoursTimeSelectorTableViewCell class], + @(MWMOpeningHoursEditorClosedSpanCell) : [MWMOpeningHoursClosedSpanTableViewCell class], + @(MWMOpeningHoursEditorAddClosedCell) : [MWMOpeningHoursAddClosedTableViewCell class], + @(MWMOpeningHoursEditorDeleteScheduleCell) : [MWMOpeningHoursDeleteScheduleTableViewCell class], + @(MWMOpeningHoursEditorAddScheduleCell) : [MWMOpeningHoursAddScheduleTableViewCell class], }; @interface MWMOpeningHoursEditorViewController () { @@ -75,9 +71,9 @@ namespace - (void)configTable { - [self.tableView registerNib:[UINib nibWithNibName:kStreetEditorEditCell bundle:nil] - forCellReuseIdentifier:kStreetEditorEditCell]; - [self.tableView registerClass:[MWMTableViewSubtitleCell class] forCellReuseIdentifier:[MWMTableViewSubtitleCell className]]; + UITableView * tv = self.tableView; + [tv registerWithCellClass:[MWMStreetEditorEditTableViewCell class]]; + [tv registerWithCellClass:[MWMTableViewSubtitleCell class]]; } #pragma mark - Actions @@ -152,18 +148,22 @@ namespace UITableViewCell * cell = nil; if (m_streets.empty()) { - cell = [tableView dequeueReusableCellWithIdentifier:kStreetEditorEditCell]; + cell = [tableView dequeueReusableCellWithCellClass:[MWMStreetEditorEditTableViewCell class] + indexPath:indexPath]; } else { if (indexPath.section == 0) { - NSString * identifier = m_streets[indexPath.row].m_localizedName.empty() ? [UITableViewCell className] : [MWMTableViewSubtitleCell className]; - cell = [tableView dequeueReusableCellWithIdentifier:identifier]; + Class cls = m_streets[indexPath.row].m_localizedName.empty() + ? [UITableViewCell class] + : [MWMTableViewSubtitleCell class]; + cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; } else { - cell = [tableView dequeueReusableCellWithIdentifier:kStreetEditorEditCell]; + cell = [tableView dequeueReusableCellWithCellClass:[MWMStreetEditorEditTableViewCell class] + indexPath:indexPath]; } } From b8dc24178c25244b80d1a52f6067382a6cae997f Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:26:12 +0300 Subject: [PATCH 08/13] [cleanup] [ios] Bookmarks code cleanup. --- iphone/Maps/Bookmarks/AddSetVC.mm | 14 +++++--------- iphone/Maps/Bookmarks/BookmarksVC.mm | 7 ++++--- iphone/Maps/Bookmarks/SelectSetVC.mm | 6 ++++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/iphone/Maps/Bookmarks/AddSetVC.mm b/iphone/Maps/Bookmarks/AddSetVC.mm index f999f03e14..794bf70c05 100644 --- a/iphone/Maps/Bookmarks/AddSetVC.mm +++ b/iphone/Maps/Bookmarks/AddSetVC.mm @@ -1,14 +1,10 @@ - #import "AddSetVC.h" -#import "UIViewController+Navigation.h" #import "AddSetTableViewCell.h" +#import "SwiftBridge.h" +#import "UIViewController+Navigation.h" #include "Framework.h" -#define TEXT_FIELD_TAG 666 - -static NSString * const kAddSetCellTableViewCell = @"AddSetTableViewCell"; - @interface AddSetVC () @property (nonatomic) AddSetTableViewCell * cell; @@ -29,8 +25,7 @@ static NSString * const kAddSetCellTableViewCell = @"AddSetTableViewCell"; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSaveClicked)]; [(UIViewController *)self showBackButton]; self.title = L(@"add_new_set"); - [self.tableView registerNib:[UINib nibWithNibName:kAddSetCellTableViewCell bundle:nil] - forCellReuseIdentifier:kAddSetCellTableViewCell]; + [self.tableView registerWithCellClass:[AddSetTableViewCell class]]; } - (void)onSaveClicked @@ -53,7 +48,8 @@ static NSString * const kAddSetCellTableViewCell = @"AddSetTableViewCell"; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - self.cell = (AddSetTableViewCell *)[tableView dequeueReusableCellWithIdentifier:kAddSetCellTableViewCell]; + self.cell = static_cast( + [tableView dequeueReusableCellWithCellClass:[AddSetTableViewCell class] indexPath:indexPath]); self.cell.delegate = self; return self.cell; } diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index b1da704ee4..f05e93a9c3 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -11,6 +11,7 @@ #import "MapViewController.h" #import "MapsAppDelegate.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "Framework.h" @@ -53,8 +54,7 @@ extern NSString * const kBookmarksChangedNotification = @"BookmarksChangedNotifi - (void)viewDidLoad { [super viewDidLoad]; - [self.tableView registerNib:[UINib nibWithNibName:[MWMBookmarkNameCell className] bundle:nil] - forCellReuseIdentifier:[MWMBookmarkNameCell className]]; + [self.tableView registerWithCellClass:[MWMBookmarkNameCell class]]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView @@ -110,7 +110,8 @@ extern NSString * const kBookmarksChangedNotification = @"BookmarksChangedNotifi { if (indexPath.row == 0) { - cell = [tableView dequeueReusableCellWithIdentifier:[MWMBookmarkNameCell className]]; + cell = [tableView dequeueReusableCellWithCellClass:[MWMBookmarkNameCell class] + indexPath:indexPath]; [static_cast(cell) configWithName:@(cat->GetName().c_str()) delegate:self]; } else diff --git a/iphone/Maps/Bookmarks/SelectSetVC.mm b/iphone/Maps/Bookmarks/SelectSetVC.mm index b5efb6c83f..0d0ed743a7 100644 --- a/iphone/Maps/Bookmarks/SelectSetVC.mm +++ b/iphone/Maps/Bookmarks/SelectSetVC.mm @@ -1,5 +1,6 @@ -#import "AddSetVC.h" #import "SelectSetVC.h" +#import "AddSetVC.h" +#import "SwiftBridge.h" #import "UIViewController+Navigation.h" #include "Framework.h" @@ -55,7 +56,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; + Class cls = [UITableViewCell class]; + auto cell = [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; if (indexPath.section == 0) { cell.textLabel.text = L(@"add_new_set"); From 3802282b92d821225eeec0722bd0be12d66a50bf Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:26:27 +0300 Subject: [PATCH 09/13] [cleanup] [ios] Route preview code cleanup. --- .../Views/RoutePreview/MWMRoutePreview.mm | 9 ++++----- .../Views/RoutePreview/MWMTaxiPreviewDataSource.mm | 9 +++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm index 235421dfa8..c1edb6dd6a 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMRoutePreview.mm @@ -65,8 +65,7 @@ CGFloat constexpr kAdditionalHeight = 20.; self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.layer.shouldRasterize = YES; self.layer.rasterizationScale = UIScreen.mainScreen.scale; - [self.collectionView registerNib:[UINib nibWithNibName:[MWMRoutePointCell className] bundle:nil] - forCellWithReuseIdentifier:[MWMRoutePointCell className]]; + [self.collectionView registerWithCellClass:[MWMRoutePointCell class]]; [self setupProgresses]; [self.backButton matchInterfaceOrientation]; @@ -464,9 +463,9 @@ CGFloat constexpr kAdditionalHeight = 20.; - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - MWMRoutePointCell * cell = - [collectionView dequeueReusableCellWithReuseIdentifier:[MWMRoutePointCell className] - forIndexPath:indexPath]; + Class cls = [MWMRoutePointCell class]; + auto cell = static_cast( + [collectionView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); cell.number.text = @(indexPath.row + 1).stringValue; if (indexPath.row == 0) { diff --git a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm index 4452715931..cbe8036f22 100644 --- a/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm +++ b/iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/MWMTaxiPreviewDataSource.mm @@ -3,6 +3,7 @@ #import "MWMNetworkPolicy.h" #import "MWMRoutePoint.h" #import "MWMTaxiPreviewCell.h" +#import "SwiftBridge.h" #include "Framework.h" @@ -83,8 +84,7 @@ using namespace uber; collectionView.delegate = self; collectionView.showsVerticalScrollIndicator = NO; collectionView.showsHorizontalScrollIndicator = NO; - auto name = [MWMTaxiPreviewCell className]; - [collectionView registerNib:[UINib nibWithNibName:name bundle:nil] forCellWithReuseIdentifier:name]; + [collectionView registerWithCellClass:[MWMTaxiPreviewCell class]]; } return self; } @@ -183,8 +183,9 @@ using namespace uber; - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - MWMTaxiPreviewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:[MWMTaxiPreviewCell className] - forIndexPath:indexPath]; + Class cls = [MWMTaxiPreviewCell class]; + auto cell = static_cast( + [collectionView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [cell configWithProduct:m_products[indexPath.row]]; return cell; From 94f2157821e47b570848533d4f8a1a442d7a9095 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:26:41 +0300 Subject: [PATCH 10/13] [cleanup] [ios] Downloader code cleanup. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 6 +-- .../DataSources/MWMMapDownloaderDataSource.h | 2 +- .../DataSources/MWMMapDownloaderDataSource.mm | 14 +++--- .../MWMMapDownloaderDefaultDataSource.mm | 23 ++++----- ...MMapDownloaderExtendedDataSourceWithAds.mm | 8 ++-- .../MWMMapDownloaderSearchDataSource.mm | 18 ++++--- .../MWMBaseMapDownloaderViewController.mm | 47 ++++++++----------- 7 files changed, 52 insertions(+), 66 deletions(-) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index f9c645b4b5..7fc2fd25d1 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -1903,9 +1903,9 @@ F6E2FC111E097B9F0083EBEC /* MWMMapDownloaderTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMapDownloaderTableViewCell.xib; sourceTree = ""; }; F6E2FC121E097B9F0083EBEC /* MWMMapDownloaderTableViewCellProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderTableViewCellProtocol.h; sourceTree = ""; }; F6E2FC141E097B9F0083EBEC /* MWMMapDownloaderDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderDataSource.h; sourceTree = ""; }; - F6E2FC151E097B9F0083EBEC /* MWMMapDownloaderDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderDataSource.mm; sourceTree = ""; }; + F6E2FC151E097B9F0083EBEC /* MWMMapDownloaderDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMMapDownloaderDataSource.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FC161E097B9F0083EBEC /* MWMMapDownloaderDefaultDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderDefaultDataSource.h; sourceTree = ""; }; - F6E2FC171E097B9F0083EBEC /* MWMMapDownloaderDefaultDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderDefaultDataSource.mm; sourceTree = ""; }; + F6E2FC171E097B9F0083EBEC /* MWMMapDownloaderDefaultDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMMapDownloaderDefaultDataSource.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FC181E097B9F0083EBEC /* MWMMapDownloaderExtendedDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderExtendedDataSource.h; sourceTree = ""; }; F6E2FC191E097B9F0083EBEC /* MWMMapDownloaderExtendedDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderExtendedDataSource.mm; sourceTree = ""; }; F6E2FC1A1E097B9F0083EBEC /* MWMMapDownloaderExtendedDataSourceWithAds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderExtendedDataSourceWithAds.h; sourceTree = ""; }; @@ -1913,7 +1913,7 @@ F6E2FC1C1E097B9F0083EBEC /* MWMMapDownloaderSearchDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderSearchDataSource.h; sourceTree = ""; }; F6E2FC1D1E097B9F0083EBEC /* MWMMapDownloaderSearchDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderSearchDataSource.mm; sourceTree = ""; }; F6E2FC1E1E097B9F0083EBEC /* MWMBaseMapDownloaderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBaseMapDownloaderViewController.h; sourceTree = ""; }; - F6E2FC1F1E097B9F0083EBEC /* MWMBaseMapDownloaderViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBaseMapDownloaderViewController.mm; sourceTree = ""; }; + F6E2FC1F1E097B9F0083EBEC /* MWMBaseMapDownloaderViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMBaseMapDownloaderViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6E2FC201E097B9F0083EBEC /* MWMMapDownloaderProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderProtocol.h; sourceTree = ""; }; F6E2FC211E097B9F0083EBEC /* MWMMapDownloaderTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderTypes.h; sourceTree = ""; }; F6E2FC221E097B9F0083EBEC /* MWMMapDownloaderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderViewController.h; sourceTree = ""; }; diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.h b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.h index 0b1e897fa7..79b5e26792 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.h +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.h @@ -14,7 +14,7 @@ - (instancetype)initWithDelegate:(id)delegate mode:(mwm::DownloaderMode)mode; - (NSString *)parentCountryId; - (NSString *)countryIdForIndexPath:(NSIndexPath *)indexPath; -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath; +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath; - (void)fillCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath; - (BOOL)isButtonCell:(NSInteger)section; diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.mm b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.mm index 8837d4a687..35e4a9a376 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.mm +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDataSource.mm @@ -1,9 +1,10 @@ -#import "MWMCommon.h" #import "MWMMapDownloaderDataSource.h" +#import "MWMCommon.h" #import "MWMMapDownloaderLargeCountryTableViewCell.h" #import "MWMMapDownloaderPlaceTableViewCell.h" #import "MWMMapDownloaderSubplaceTableViewCell.h" #import "MWMMapDownloaderTypes.h" +#import "SwiftBridge.h" #include "Framework.h" @@ -57,8 +58,9 @@ using namespace storage; - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath]; - MWMMapDownloaderTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; + Class cls = [self cellClassForIndexPath:indexPath]; + auto cell = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); [self fillCell:cell atIndexPath:indexPath]; return cell; } @@ -91,11 +93,7 @@ using namespace storage; return @(kInvalidCountryId.c_str()); } -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath -{ - return nil; -} - +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { return nil; } - (NSString *)searchMatchedResultForCountryId:(NSString *)countryId { return nil; diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDefaultDataSource.mm b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDefaultDataSource.mm index 0884e238d1..0fafc6a38d 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDefaultDataSource.mm +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderDefaultDataSource.mm @@ -1,17 +1,14 @@ +#import "MWMMapDownloaderDefaultDataSource.h" #import "MWMCommon.h" #import "MWMMapDownloaderButtonTableViewCell.h" -#import "MWMMapDownloaderDefaultDataSource.h" +#import "MWMMapDownloaderLargeCountryTableViewCell.h" +#import "MWMMapDownloaderPlaceTableViewCell.h" #import "MWMStorage.h" #import "Statistics.h" +#import "SwiftBridge.h" #include "Framework.h" -extern NSString * const kCountryCellIdentifier; -extern NSString * const kSubplaceCellIdentifier; -extern NSString * const kPlaceCellIdentifier; -extern NSString * const kLargeCountryCellIdentifier; -extern NSString * const kButtonCellIdentifier; - namespace { auto compareStrings = ^NSComparisonResult(NSString * s1, NSString * s2) @@ -136,7 +133,9 @@ using namespace mwm; { if ([self isButtonCell:indexPath.section]) { - MWMMapDownloaderButtonTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:kButtonCellIdentifier]; + Class cls = [MWMMapDownloaderButtonTableViewCell class]; + auto cell = static_cast( + [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); cell.delegate = self.delegate; return cell; } @@ -206,15 +205,17 @@ using namespace mwm; return nsCountryId; } -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { auto const & s = GetFramework().GetStorage(); TCountriesVec children; s.GetChildren([self countryIdForIndexPath:indexPath].UTF8String, children); BOOL const haveChildren = !children.empty(); if (haveChildren) - return kLargeCountryCellIdentifier; - return self.isParentRoot ? kCountryCellIdentifier : kPlaceCellIdentifier; + return [MWMMapDownloaderLargeCountryTableViewCell class]; + if (self.isParentRoot) + return [MWMMapDownloaderTableViewCell class]; + return [MWMMapDownloaderPlaceTableViewCell class]; } #pragma mark - Helpers diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSourceWithAds.mm b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSourceWithAds.mm index 078309e330..9a08bf974c 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSourceWithAds.mm +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderExtendedDataSourceWithAds.mm @@ -4,8 +4,6 @@ #include "Framework.h" -extern NSString * const kAdsCellIdentifier; - namespace { auto constexpr extraSection = MWMMapDownloaderDataSourceExtraSection::Ads; @@ -69,11 +67,11 @@ auto constexpr extraSection = MWMMapDownloaderDataSourceExtraSection::Ads; #pragma mark - MWMMapDownloaderDataSource -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { if ([self isExtraSection:extraSection atIndex:indexPath.section]) - return kAdsCellIdentifier; - return [super cellIdentifierForIndexPath:indexPath]; + return [MWMMapDownloaderAdsTableViewCell class]; + return [super cellClassForIndexPath:indexPath]; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath diff --git a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderSearchDataSource.mm b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderSearchDataSource.mm index 3601a79a83..2ed8305645 100644 --- a/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderSearchDataSource.mm +++ b/iphone/Maps/UI/Downloader/DataSources/MWMMapDownloaderSearchDataSource.mm @@ -1,14 +1,12 @@ #import "MWMMapDownloaderSearchDataSource.h" +#import "MWMMapDownloaderLargeCountryTableViewCell.h" +#import "MWMMapDownloaderPlaceTableViewCell.h" +#import "MWMMapDownloaderSubplaceTableViewCell.h" #include "Framework.h" using namespace storage; -extern NSString * const kCountryCellIdentifier; -extern NSString * const kSubplaceCellIdentifier; -extern NSString * const kPlaceCellIdentifier; -extern NSString * const kLargeCountryCellIdentifier; - @interface MWMMapDownloaderSearchDataSource () @property (copy, nonatomic) NSArray * searchCountryIds; @@ -66,7 +64,7 @@ extern NSString * const kLargeCountryCellIdentifier; return @(kInvalidCountryId.c_str()); } -- (NSString *)cellIdentifierForIndexPath:(NSIndexPath *)indexPath +- (Class)cellClassForIndexPath:(NSIndexPath *)indexPath { auto const & s = GetFramework().GetStorage(); NSString * countryId = [self countryIdForIndexPath:indexPath]; @@ -74,16 +72,16 @@ extern NSString * const kLargeCountryCellIdentifier; s.GetChildren(countryId.UTF8String, children); BOOL const haveChildren = !children.empty(); if (haveChildren) - return kLargeCountryCellIdentifier; + return [MWMMapDownloaderLargeCountryTableViewCell class]; NodeAttrs nodeAttrs; s.GetNodeAttrs(countryId.UTF8String, nodeAttrs); NSString * nodeLocalName = @(nodeAttrs.m_nodeLocalName.c_str()); NSString * matchedResult = [self searchMatchedResultForCountryId:countryId]; if (![nodeLocalName isEqualToString:matchedResult]) - return kSubplaceCellIdentifier; + return [MWMMapDownloaderSubplaceTableViewCell class]; if (nodeAttrs.m_parentInfo.size() == 1 && nodeAttrs.m_parentInfo[0].m_id == s.GetRootId()) - return kCountryCellIdentifier; - return kPlaceCellIdentifier; + return [MWMMapDownloaderTableViewCell class]; + return [MWMMapDownloaderPlaceTableViewCell class]; } - (NSString *)searchMatchedResultForCountryId:(NSString *)countryId diff --git a/iphone/Maps/UI/Downloader/MWMBaseMapDownloaderViewController.mm b/iphone/Maps/UI/Downloader/MWMBaseMapDownloaderViewController.mm index 5f2782234b..a1a3ccb5c9 100644 --- a/iphone/Maps/UI/Downloader/MWMBaseMapDownloaderViewController.mm +++ b/iphone/Maps/UI/Downloader/MWMBaseMapDownloaderViewController.mm @@ -1,6 +1,6 @@ -#import "MWMCommon.h" #import "MWMAlertViewController.h" #import "MWMButton.h" +#import "MWMCommon.h" #import "MWMFrameworkListener.h" #import "MWMMapDownloaderAdsTableViewCell.h" #import "MWMMapDownloaderCellHeader.h" @@ -18,19 +18,13 @@ #import "MWMToast.h" #import "MapsAppDelegate.h" #import "Statistics.h" +#import "SwiftBridge.h" #import "UIViewController+Navigation.h" #include "Framework.h" #include "storage/index.hpp" -extern NSString * const kAdsCellIdentifier = @"MWMMapDownloaderAdsTableViewCell"; -extern NSString * const kButtonCellIdentifier = @"MWMMapDownloaderButtonTableViewCell"; -extern NSString * const kCountryCellIdentifier = @"MWMMapDownloaderTableViewCell"; -extern NSString * const kLargeCountryCellIdentifier = @"MWMMapDownloaderLargeCountryTableViewCell"; -extern NSString * const kPlaceCellIdentifier = @"MWMMapDownloaderPlaceTableViewCell"; -extern NSString * const kSubplaceCellIdentifier = @"MWMMapDownloaderSubplaceTableViewCell"; - namespace { @@ -225,20 +219,16 @@ using namespace mwm; #pragma mark - Table -- (void)registerCellWithIdentifier:(NSString *)identifier -{ - [self.tableView registerNib:[UINib nibWithNibName:identifier bundle:nil] forCellReuseIdentifier:identifier]; -} - - (void)configTable { - self.tableView.separatorColor = [UIColor blackDividers]; - [self registerCellWithIdentifier:kAdsCellIdentifier]; - [self registerCellWithIdentifier:kButtonCellIdentifier]; - [self registerCellWithIdentifier:kCountryCellIdentifier]; - [self registerCellWithIdentifier:kLargeCountryCellIdentifier]; - [self registerCellWithIdentifier:kPlaceCellIdentifier]; - [self registerCellWithIdentifier:kSubplaceCellIdentifier]; + UITableView * tv = self.tableView; + tv.separatorColor = [UIColor blackDividers]; + [tv registerWithCellClass:[MWMMapDownloaderAdsTableViewCell class]]; + [tv registerWithCellClass:[MWMMapDownloaderButtonTableViewCell class]]; + [tv registerWithCellClass:[MWMMapDownloaderTableViewCell class]]; + [tv registerWithCellClass:[MWMMapDownloaderLargeCountryTableViewCell class]]; + [tv registerWithCellClass:[MWMMapDownloaderPlaceTableViewCell class]]; + [tv registerWithCellClass:[MWMMapDownloaderSubplaceTableViewCell class]]; } #pragma mark - MWMMyTargetDelegate @@ -416,15 +406,15 @@ using namespace mwm; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; - NSString * identifier = [self.dataSource cellIdentifierForIndexPath:indexPath]; - if ([identifier isEqualToString:kLargeCountryCellIdentifier]) + Class cls = [self.dataSource cellClassForIndexPath:indexPath]; + if ([MWMMapDownloaderLargeCountryTableViewCell class] == cls) { NSAssert(self.dataSource != nil, @"Datasource is nil."); NSString * countyId = [self.dataSource countryIdForIndexPath:indexPath]; NSAssert(countyId != nil, @"CountryId is nil."); [self openNodeSubtree:countyId.UTF8String]; } - else if ([identifier isEqualToString:kAdsCellIdentifier]) + else if ([MWMMapDownloaderAdsTableViewCell class] == cls) { [[MWMMyTarget manager] handleBannerClickAtIndex:indexPath.row withController:self]; } @@ -436,8 +426,8 @@ using namespace mwm; - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - NSString * reuseIdentifier = [self.dataSource cellIdentifierForIndexPath:indexPath]; - if ([reuseIdentifier isEqualToString:kAdsCellIdentifier]) + Class cls = [self.dataSource cellClassForIndexPath:indexPath]; + if ([MWMMapDownloaderAdsTableViewCell class] == cls) { MWMMapDownloaderExtendedDataSourceWithAds * adDataSource = static_cast(self.dataSource); @@ -451,7 +441,8 @@ using namespace mwm; { if ([self.dataSource isButtonCell:indexPath.section]) return [MWMMapDownloaderButtonTableViewCell estimatedHeight]; - Class cellClass = NSClassFromString([self.dataSource cellIdentifierForIndexPath:indexPath]); + Class cellClass = + [self.dataSource cellClassForIndexPath:indexPath]; return [cellClass estimatedHeight]; } @@ -486,8 +477,8 @@ using namespace mwm; return; if ([self.dataSource isButtonCell:indexPath.section]) return; - NSString * identifier = [self.dataSource cellIdentifierForIndexPath:indexPath]; - if ([identifier isEqualToString:kAdsCellIdentifier]) + Class cls = [self.dataSource cellClassForIndexPath:indexPath]; + if ([MWMMapDownloaderAdsTableViewCell class] == cls) return; [self showActionSheetForRowAtIndexPath:indexPath]; } From 7cbf6af7bbcea2d29b37613bd3f954d1c558bf14 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Wed, 25 Jan 2017 15:26:55 +0300 Subject: [PATCH 11/13] [cleanup] [ios] Bottom menu code cleanup. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 2 +- .../MWMBottomMenuCollectionViewCell.h | 6 ++++ .../MWMBottomMenuCollectionViewCell.mm | 7 +++++ ...MBottomMenuCollectionViewLandscapeCell.xib | 27 ++++++++++-------- ...WMBottomMenuCollectionViewPortraitCell.xib | 28 +++++++++++-------- .../BottomMenu/MWMBottomMenuViewController.mm | 18 +++++------- 6 files changed, 53 insertions(+), 35 deletions(-) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 7fc2fd25d1..48035b6b5c 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -1581,7 +1581,7 @@ 349D1AC91E2E325B004A2006 /* MWMBottomMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBottomMenuView.h; sourceTree = ""; }; 349D1ACA1E2E325B004A2006 /* MWMBottomMenuView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBottomMenuView.mm; sourceTree = ""; }; 349D1ACB1E2E325B004A2006 /* MWMBottomMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBottomMenuViewController.h; sourceTree = ""; }; - 349D1ACC1E2E325B004A2006 /* MWMBottomMenuViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBottomMenuViewController.mm; sourceTree = ""; }; + 349D1ACC1E2E325B004A2006 /* MWMBottomMenuViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMBottomMenuViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 349D1ACD1E2E325B004A2006 /* MWMBottomMenuViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBottomMenuViewController.xib; sourceTree = ""; }; 34AB39BF1D2BD8310021857D /* MWMStopButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMStopButton.h; sourceTree = ""; }; 34AB39C01D2BD8310021857D /* MWMStopButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMStopButton.mm; sourceTree = ""; }; diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.h b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.h index 285d1d743b..1e3a038b9e 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.h +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.h @@ -9,3 +9,9 @@ isEnabled:(BOOL)isEnabled; @end + +@interface MWMBottomMenuCollectionViewPortraitCell : MWMBottomMenuCollectionViewCell +@end + +@interface MWMBottomMenuCollectionViewLandscapeCell : MWMBottomMenuCollectionViewCell +@end diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.mm index 30c51c5e3d..55b8c3b043 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.mm +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewCell.mm @@ -1,5 +1,6 @@ #import "MWMBottomMenuCollectionViewCell.h" #import "MWMCommon.h" +#import "SwiftBridge.h" #import "UIImageView+Coloring.h" @interface MWMBottomMenuCollectionViewCell () @@ -54,3 +55,9 @@ } @end + +@implementation MWMBottomMenuCollectionViewPortraitCell +@end + +@implementation MWMBottomMenuCollectionViewLandscapeCell +@end diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewLandscapeCell.xib b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewLandscapeCell.xib index 9f6c2c04b1..68768b8eca 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewLandscapeCell.xib +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewLandscapeCell.xib @@ -1,22 +1,27 @@ - - + + + + + - + + - + HelveticaNeue-Medium - + - + + @@ -31,7 +36,7 @@ - diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewPortraitCell.xib b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewPortraitCell.xib index d342b87659..2716e26b6a 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewPortraitCell.xib +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuCollectionViewPortraitCell.xib @@ -1,22 +1,27 @@ - - + + + + + - + + - + HelveticaNeue-Medium - + - + + @@ -31,7 +36,7 @@ - + @@ -77,7 +82,6 @@ - diff --git a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm index 34cbb8c008..e5b95a4a8c 100644 --- a/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm +++ b/iphone/Maps/UI/BottomMenu/MWMBottomMenuViewController.mm @@ -35,9 +35,6 @@ extern NSString * const kSearchStateKey; namespace { -NSString * const kCollectionCellPortrait = @"MWMBottomMenuCollectionViewPortraitCell"; -NSString * const kCollectionCelllandscape = @"MWMBottomMenuCollectionViewLandscapeCell"; - CGFloat constexpr kLayoutThreshold = 420.0; NSTimeInterval constexpr kRoutingDiminishInterval = 5.0; } // namespace @@ -124,10 +121,9 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { - (void)viewDidLoad { [super viewDidLoad]; - [self.buttonsCollectionView registerNib:[UINib nibWithNibName:kCollectionCellPortrait bundle:nil] - forCellWithReuseIdentifier:kCollectionCellPortrait]; - [self.buttonsCollectionView registerNib:[UINib nibWithNibName:kCollectionCelllandscape bundle:nil] - forCellWithReuseIdentifier:kCollectionCelllandscape]; + UICollectionView * bcv = self.buttonsCollectionView; + [bcv registerWithCellClass:[MWMBottomMenuCollectionViewPortraitCell class]]; + [bcv registerWithCellClass:[MWMBottomMenuCollectionViewLandscapeCell class]]; MWMBottomMenuLayout * cvLayout = (MWMBottomMenuLayout *)self.buttonsCollectionView.collectionViewLayout; cvLayout.layoutThreshold = kLayoutThreshold; @@ -299,10 +295,10 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) { cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { BOOL const isWideMenu = self.view.width > kLayoutThreshold; - MWMBottomMenuCollectionViewCell * cell = - [collectionView dequeueReusableCellWithReuseIdentifier:isWideMenu ? kCollectionCelllandscape - : kCollectionCellPortrait - forIndexPath:indexPath]; + Class cls = isWideMenu ? [MWMBottomMenuCollectionViewLandscapeCell class] + : [MWMBottomMenuCollectionViewPortraitCell class]; + auto cell = static_cast( + [collectionView dequeueReusableCellWithCellClass:cls indexPath:indexPath]); NSInteger item = indexPath.item; if (isInterfaceRightToLeft()) item = [self collectionView:collectionView numberOfItemsInSection:indexPath.section] - item - 1; From fcabc829e91809a25efb314ead61f9ad8679637a Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 26 Jan 2017 10:13:47 +0300 Subject: [PATCH 12/13] [cleanup] [ios] Sorted categories. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 48035b6b5c..e520310f16 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -2667,6 +2667,7 @@ 3454D7981E07F045004AF2AD /* Categories */ = { isa = PBXGroup; children = ( + 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */, 3454D7991E07F045004AF2AD /* CALayer+RuntimeAttributes.h */, 3454D79A1E07F045004AF2AD /* CALayer+RuntimeAttributes.mm */, 3454D79B1E07F045004AF2AD /* CLLocation+Mercator.h */, @@ -2678,6 +2679,7 @@ 3454D7A11E07F045004AF2AD /* UIButton+Orientation.mm */, 3454D7A21E07F045004AF2AD /* UIButton+RuntimeAttributes.h */, 3454D7A31E07F045004AF2AD /* UIButton+RuntimeAttributes.mm */, + 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */, 3454D7A41E07F045004AF2AD /* UIColor+MapsMeColor.h */, 3454D7A51E07F045004AF2AD /* UIColor+MapsMeColor.mm */, 3454D7A61E07F045004AF2AD /* UIFont+MapsMeFonts.h */, @@ -2690,22 +2692,20 @@ 3454D7AD1E07F045004AF2AD /* UIKitCategories.mm */, 3454D7AE1E07F045004AF2AD /* UILabel+RuntimeAttributes.h */, 3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm */, + 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */, 3454D7B01E07F045004AF2AD /* UISwitch+RuntimeAttributes.h */, 3454D7B11E07F045004AF2AD /* UISwitch+RuntimeAttributes.m */, + 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */, 34D3AFE01E376F7E004100F9 /* UITableView+Updates.swift */, 3454D7B21E07F045004AF2AD /* UITextField+RuntimeAttributes.h */, 3454D7B31E07F045004AF2AD /* UITextField+RuntimeAttributes.mm */, 3454D7B41E07F045004AF2AD /* UITextView+RuntimeAttributes.h */, 3454D7B51E07F045004AF2AD /* UITextView+RuntimeAttributes.mm */, + 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */, 3454D7B61E07F045004AF2AD /* UIView+RuntimeAttributes.h */, 3454D7B71E07F045004AF2AD /* UIView+RuntimeAttributes.mm */, 34F7422F1E0834F400AC1FD6 /* UIViewController+Navigation.h */, 34F742301E0834F400AC1FD6 /* UIViewController+Navigation.mm */, - 34D3AFE81E378AF1004100F9 /* UINib+Init.swift */, - 34D3AFEC1E378D61004100F9 /* UIView+Id.swift */, - 34D3AFF01E37945B004100F9 /* UITableView+Cells.swift */, - 34D3AFF41E37A36A004100F9 /* UICollectionView+Cells.swift */, - 34D3B04D1E38A20C004100F9 /* Bundle+Init.swift */, ); path = Categories; sourceTree = ""; @@ -5124,7 +5124,6 @@ 674A7E301C0DB10B003D48E1 /* MWMMapWidgets.mm in Sources */, 3404754D1E081A4600C92850 /* MWMKeyboard.mm in Sources */, 34EF94291C05A6F30050B714 /* MWMSegue.mm in Sources */, - F6E2FDA71E097BA00083EBEC /* MWMButtonCell.mm in Sources */, F6E2FE731E097BA00083EBEC /* MWMOpeningHours.mm in Sources */, F6E2FF601E097BA00083EBEC /* MWMSettingsViewController.mm in Sources */, F6E2FE2B1E097BA00083EBEC /* MWMStreetEditorEditTableViewCell.mm in Sources */, From 4ddb3560df8c8f7add4edfba8e3f74162d83d196 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 26 Jan 2017 10:16:32 +0300 Subject: [PATCH 13/13] [cleanup] Review fixes. --- iphone/Maps/Categories/Bundle+Init.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iphone/Maps/Categories/Bundle+Init.swift b/iphone/Maps/Categories/Bundle+Init.swift index 52d23fc5b0..5b8f0f141c 100644 --- a/iphone/Maps/Categories/Bundle+Init.swift +++ b/iphone/Maps/Categories/Bundle+Init.swift @@ -1,5 +1,5 @@ extension Bundle { - func load(viewClass: AnyClass, owner: Any?, options: [AnyHashable : Any]? = nil) -> [Any]? { + func load(viewClass: AnyClass, owner: Any? = nil, options: [AnyHashable : Any]? = nil) -> [Any]? { return loadNibNamed(toString(viewClass), owner: owner, options: options) } }