forked from organicmaps/organicmaps
[swift] [ios] Migrated Settings cells to Swift.
This commit is contained in:
parent
98123085dc
commit
3b7a716dc7
20 changed files with 442 additions and 589 deletions
|
@ -129,18 +129,12 @@
|
|||
34479C7D1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; };
|
||||
344D77B41D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; };
|
||||
344D77B51D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; };
|
||||
345050021E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; };
|
||||
345050031E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; };
|
||||
345050041E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; };
|
||||
345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; };
|
||||
345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; };
|
||||
345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; };
|
||||
345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; };
|
||||
345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; };
|
||||
3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; };
|
||||
345050121E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; };
|
||||
345050131E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; };
|
||||
345050141E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; };
|
||||
345050231E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; };
|
||||
345050241E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; };
|
||||
345050251E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; };
|
||||
3454E05F1DF00DAE00F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; };
|
||||
3454E0601DF00DC000F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; };
|
||||
3454E0611DF00DC100F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; };
|
||||
|
@ -433,6 +427,12 @@
|
|||
34FED54D1D1D45B900183B1B /* MWMLocationPredictor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54C1D1D45B900183B1B /* MWMLocationPredictor.mm */; };
|
||||
34FED5501D21121000183B1B /* CLLocation+Mercator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */; };
|
||||
34FED5511D21121000183B1B /* CLLocation+Mercator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */; };
|
||||
34FFADC81E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; };
|
||||
34FFADC91E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; };
|
||||
34FFADCA1E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; };
|
||||
34FFADCC1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; };
|
||||
34FFADCD1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; };
|
||||
34FFADCE1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; };
|
||||
4519503A1B7A3E070085DA05 /* patterns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 451950391B7A3E070085DA05 /* patterns.txt */; };
|
||||
452FCA3B1B6A3DF7007019AB /* colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = 452FCA3A1B6A3DF7007019AB /* colors.txt */; };
|
||||
46F26C7310F61FD600ECCA39 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46F26C7210F61FD600ECCA39 /* OpenGLES.framework */; };
|
||||
|
@ -1550,14 +1550,10 @@
|
|||
344BDB021B9069810076DB31 /* MWMSearchTabbedViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedViewProtocol.h; sourceTree = "<group>"; };
|
||||
344D77B21D1BD7C800DBED70 /* MWMLocationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationManager.h; sourceTree = "<group>"; };
|
||||
344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMLocationManager.mm; sourceTree = "<group>"; };
|
||||
34504FFC1E0287C400A8DC59 /* LinkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkCell.h; sourceTree = "<group>"; };
|
||||
34504FFD1E0287C400A8DC59 /* LinkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LinkCell.mm; sourceTree = "<group>"; };
|
||||
34504FFE1E0287C400A8DC59 /* SelectableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectableCell.h; sourceTree = "<group>"; };
|
||||
34504FFF1E0287C400A8DC59 /* SelectableCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SelectableCell.mm; sourceTree = "<group>"; };
|
||||
345050001E0287C400A8DC59 /* SwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwitchCell.h; sourceTree = "<group>"; };
|
||||
345050011E0287C400A8DC59 /* SwitchCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SwitchCell.mm; sourceTree = "<group>"; };
|
||||
345050101E02887000A8DC59 /* MWMSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSettingsViewController.h; sourceTree = "<group>"; };
|
||||
345050111E02887000A8DC59 /* MWMSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSettingsViewController.mm; sourceTree = "<group>"; };
|
||||
345050211E028B8000A8DC59 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewLinkCell.swift; sourceTree = "<group>"; };
|
||||
3454E05E1DF00DAE00F40F46 /* banners.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = banners.txt; path = ../../data/banners.txt; sourceTree = "<group>"; };
|
||||
3456E0201DC0C4030055DF50 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = Frameworks/HockeySDK.embeddedframework/HockeySDK.framework; sourceTree = "<group>"; };
|
||||
3456E0251DC0C4500055DF50 /* HockeySDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = HockeySDKResources.bundle; path = Frameworks/HockeySDK.embeddedframework/Resources/HockeySDKResources.bundle; sourceTree = "<group>"; };
|
||||
|
@ -1727,7 +1723,7 @@
|
|||
34ABA62E1C2D58F300FE1BEC /* MWMInputEmailValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMInputEmailValidator.h; sourceTree = "<group>"; };
|
||||
34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputEmailValidator.mm; sourceTree = "<group>"; };
|
||||
34B104201D6EE45700C8B577 /* MWMUnitsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMUnitsController.h; sourceTree = "<group>"; };
|
||||
34B104211D6EE45700C8B577 /* MWMUnitsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMUnitsController.mm; sourceTree = "<group>"; };
|
||||
34B104211D6EE45700C8B577 /* MWMUnitsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMUnitsController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
34B104241D6F040E00C8B577 /* MWMAboutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAboutController.h; sourceTree = "<group>"; };
|
||||
34B104251D6F040E00C8B577 /* MWMAboutController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAboutController.mm; sourceTree = "<group>"; };
|
||||
34B646BB1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = "<group>"; };
|
||||
|
@ -1852,6 +1848,8 @@
|
|||
34FED54E1D21121000183B1B /* CLLocation+Mercator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+Mercator.h"; sourceTree = "<group>"; };
|
||||
34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CLLocation+Mercator.mm"; sourceTree = "<group>"; };
|
||||
34FED5521D2123CE00183B1B /* MWMLocationHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMLocationHelpers.h; sourceTree = "<group>"; };
|
||||
34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSelectableCell.swift; sourceTree = "<group>"; };
|
||||
34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSwitchCell.swift; sourceTree = "<group>"; };
|
||||
3D443C9C19E421EE0025C2FC /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
3DDB4BC31DAB98F000F4D021 /* libpartners_api.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartners_api.a; path = "../../../omim-xcode-build/Debug-iphonesimulator/libpartners_api.a"; sourceTree = "<group>"; };
|
||||
451950391B7A3E070085DA05 /* patterns.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = patterns.txt; path = ../../data/patterns.txt; sourceTree = "<group>"; };
|
||||
|
@ -2073,7 +2071,7 @@
|
|||
F65B31F41DD2106700105FDE /* MWMiPadPlacePageLayoutImpl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMiPadPlacePageLayoutImpl.mm; sourceTree = "<group>"; };
|
||||
F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry_7.1.0.a; path = Frameworks/libFlurry_7.1.0.a; sourceTree = "<group>"; };
|
||||
F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSSettingsViewController.h; sourceTree = "<group>"; };
|
||||
F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSSettingsViewController.mm; sourceTree = "<group>"; };
|
||||
F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMTTSSettingsViewController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F67223751D74800600A3BDA2 /* MWMPlacePagePreviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePagePreviewCell.xib; sourceTree = "<group>"; };
|
||||
F67517A01D76FC46008FE34F /* MWMPlacePageLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageLayout.h; sourceTree = "<group>"; };
|
||||
F67517A11D76FC46008FE34F /* MWMPlacePageLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageLayout.mm; sourceTree = "<group>"; };
|
||||
|
@ -2102,7 +2100,7 @@
|
|||
F6AD57B91C87039F00CED368 /* MWMEditorCategoryCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorCategoryCell.mm; sourceTree = "<group>"; };
|
||||
F6AD57BC1C870A3C00CED368 /* MWMEditorCategoryCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorCategoryCell.xib; sourceTree = "<group>"; };
|
||||
F6B2E61D1C3D5F31005562DF /* MWMNightModeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNightModeController.h; sourceTree = "<group>"; };
|
||||
F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNightModeController.mm; sourceTree = "<group>"; };
|
||||
F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMNightModeController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6B870141DDCA03600BE8D94 /* MWMPlacePageEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageEntity.h; sourceTree = "<group>"; };
|
||||
F6B870151DDCA03600BE8D94 /* MWMPlacePageEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageEntity.mm; sourceTree = "<group>"; };
|
||||
F6B8701A1DDCB2F400BE8D94 /* MWMPPPreviewBannerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPPPreviewBannerCell.h; sourceTree = "<group>"; };
|
||||
|
@ -2136,7 +2134,7 @@
|
|||
F6BD33861B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationDashboardEntity.mm; sourceTree = "<group>"; };
|
||||
F6BED3761CE3726A008D31E7 /* MWMBookmarkTitleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkTitleCell.xib; sourceTree = "<group>"; };
|
||||
F6C641AE1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRecentTrackSettingsController.h; sourceTree = "<group>"; };
|
||||
F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRecentTrackSettingsController.mm; sourceTree = "<group>"; };
|
||||
F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMRecentTrackSettingsController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6CB215B1AEE704D00FB8963 /* PlacePageInfoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlacePageInfoCell.xib; sourceTree = "<group>"; };
|
||||
F6CB215E1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageInfoCell.h; sourceTree = "<group>"; };
|
||||
F6CB215F1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageInfoCell.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
|
@ -2472,11 +2470,11 @@
|
|||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.mm */,
|
||||
34EC27091CB2A7120084FA36 /* fabric_logging.hpp */,
|
||||
345050211E028B8000A8DC59 /* Bridging-Header.h */,
|
||||
34EC27081CB2A7120084FA36 /* fabric_logging_ios.mm */,
|
||||
34EC27091CB2A7120084FA36 /* fabric_logging.hpp */,
|
||||
29B97316FDCFA39411CA2CEA /* main.mm */,
|
||||
28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
|
@ -2735,12 +2733,9 @@
|
|||
34504FFB1E0287C400A8DC59 /* Cells */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
34504FFC1E0287C400A8DC59 /* LinkCell.h */,
|
||||
34504FFD1E0287C400A8DC59 /* LinkCell.mm */,
|
||||
34504FFE1E0287C400A8DC59 /* SelectableCell.h */,
|
||||
34504FFF1E0287C400A8DC59 /* SelectableCell.mm */,
|
||||
345050001E0287C400A8DC59 /* SwitchCell.h */,
|
||||
345050011E0287C400A8DC59 /* SwitchCell.mm */,
|
||||
345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */,
|
||||
34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */,
|
||||
34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */,
|
||||
);
|
||||
path = Cells;
|
||||
sourceTree = "<group>";
|
||||
|
@ -4789,7 +4784,7 @@
|
|||
349A13821DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */,
|
||||
347FD8851C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */,
|
||||
34EB84581C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */,
|
||||
345050021E0287C400A8DC59 /* LinkCell.mm in Sources */,
|
||||
34FFADCC1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */,
|
||||
F617B4E31D8FDDD5007A1A4E /* MWMBookmarkCell.mm in Sources */,
|
||||
349A357A1B53D4C9009677EE /* MWMCircularProgress.mm in Sources */,
|
||||
34B82ADA1B847FFC00180497 /* MWMSearchCell.mm in Sources */,
|
||||
|
@ -4819,6 +4814,7 @@
|
|||
F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */,
|
||||
34257D151DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */,
|
||||
34BC1E561C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */,
|
||||
345050231E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */,
|
||||
F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */,
|
||||
A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */,
|
||||
349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
|
||||
|
@ -4886,7 +4882,6 @@
|
|||
348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
|
||||
346B42AB1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */,
|
||||
34BBB7231DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */,
|
||||
345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */,
|
||||
341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
|
||||
34A759D01DC795140078C3AE /* MWMWhatsNewProfileBookingController.mm in Sources */,
|
||||
345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
|
||||
|
@ -4914,9 +4909,9 @@
|
|||
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */,
|
||||
340E10631B949D1900D975D5 /* MWMSearchBookmarksManager.mm in Sources */,
|
||||
F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */,
|
||||
345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */,
|
||||
F6E9BF291CE364150050E534 /* MWMEditBookmarkController.mm in Sources */,
|
||||
F65B31F11DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */,
|
||||
34FFADC81E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */,
|
||||
34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */,
|
||||
34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */,
|
||||
F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */,
|
||||
|
@ -5042,7 +5037,7 @@
|
|||
349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */,
|
||||
347FD8861C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */,
|
||||
6741A9EB1BF340DE002C974C /* ContextViews.mm in Sources */,
|
||||
345050031E0287C400A8DC59 /* LinkCell.mm in Sources */,
|
||||
34FFADCD1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */,
|
||||
6741A9EC1BF340DE002C974C /* MWMCircularProgress.mm in Sources */,
|
||||
342CC5F21C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */,
|
||||
6741A9EE1BF340DE002C974C /* MWMSearchCell.mm in Sources */,
|
||||
|
@ -5072,6 +5067,7 @@
|
|||
F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */,
|
||||
34257D161DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */,
|
||||
F6D4A73B1CC1267E00BD4E5B /* MWMNoteCell.mm in Sources */,
|
||||
345050241E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */,
|
||||
F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */,
|
||||
347FD8681C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */,
|
||||
6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */,
|
||||
|
@ -5139,7 +5135,6 @@
|
|||
341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
|
||||
346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */,
|
||||
34BBB7241DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */,
|
||||
345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */,
|
||||
348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */,
|
||||
348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
|
||||
345FD7E81CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
|
||||
|
@ -5167,9 +5162,9 @@
|
|||
6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */,
|
||||
6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */,
|
||||
56D545631C74A41900E3719C /* Framework.cpp in Sources */,
|
||||
345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */,
|
||||
F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */,
|
||||
F65B31F21DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */,
|
||||
34FFADC91E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */,
|
||||
F6E9BF2A1CE364150050E534 /* MWMEditBookmarkController.mm in Sources */,
|
||||
6741AA2C1BF340DE002C974C /* MWMSearchBookmarksManager.mm in Sources */,
|
||||
F6A2184A1CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */,
|
||||
|
@ -5238,6 +5233,7 @@
|
|||
849CF6B41DE842290024A8A5 /* MWMPlacePageActionBar.mm in Sources */,
|
||||
849CF6B51DE842290024A8A5 /* MWMMigrationView.mm in Sources */,
|
||||
849CF6B61DE842290024A8A5 /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */,
|
||||
34FFADCA1E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */,
|
||||
849CF6B71DE842290024A8A5 /* MWMCuisineEditorViewController.mm in Sources */,
|
||||
849CF6B81DE842290024A8A5 /* UIButton+Orientation.mm in Sources */,
|
||||
849CF6B91DE842290024A8A5 /* MWMSearchCommonCell.mm in Sources */,
|
||||
|
@ -5268,6 +5264,7 @@
|
|||
849CF6D41DE842290024A8A5 /* MWMRouterSavedState.mm in Sources */,
|
||||
849CF6D51DE842290024A8A5 /* MWMTableViewController.mm in Sources */,
|
||||
849CF6D61DE842290024A8A5 /* MWMTTSLanguageViewController.mm in Sources */,
|
||||
345050251E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */,
|
||||
849CF6D71DE842290024A8A5 /* UISwitch+RuntimeAttributes.m in Sources */,
|
||||
849CF6D81DE842290024A8A5 /* MWMSegue.mm in Sources */,
|
||||
849CF6D91DE842290024A8A5 /* Framework.cpp in Sources */,
|
||||
|
@ -5277,7 +5274,6 @@
|
|||
849CF6DD1DE842290024A8A5 /* MWMWhatsNewNavigationController.mm in Sources */,
|
||||
849CF6DE1DE842290024A8A5 /* MWMRoutePointLayout.mm in Sources */,
|
||||
849CF6DF1DE842290024A8A5 /* MWMAuthorizationCommon.mm in Sources */,
|
||||
3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */,
|
||||
849CF6E01DE842290024A8A5 /* MWMSearchHistoryClearCell.mm in Sources */,
|
||||
849CF6E11DE842290024A8A5 /* MWMDownloaderDialogHeader.mm in Sources */,
|
||||
849CF6E21DE842290024A8A5 /* MWMSearchTableView.mm in Sources */,
|
||||
|
@ -5300,6 +5296,7 @@
|
|||
849CF6F31DE842290024A8A5 /* MWMButton.mm in Sources */,
|
||||
849CF6F51DE842290024A8A5 /* MWMPlacePageLayout.mm in Sources */,
|
||||
849CF6F61DE842290024A8A5 /* MWMNavigationDashboardEntity.mm in Sources */,
|
||||
34FFADCE1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */,
|
||||
849CF6F71DE842290024A8A5 /* MWMPlacePageInfoCell.mm in Sources */,
|
||||
849CF6F81DE842290024A8A5 /* MWMSearchHistoryManager.mm in Sources */,
|
||||
849CF6F91DE842290024A8A5 /* CALayer+RuntimeAttributes.mm in Sources */,
|
||||
|
@ -5359,7 +5356,6 @@
|
|||
849CF72E1DE842290024A8A5 /* MWMSearchHistoryMyPositionCell.mm in Sources */,
|
||||
341966881E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */,
|
||||
849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */,
|
||||
345050041E0287C400A8DC59 /* LinkCell.mm in Sources */,
|
||||
849CF7301DE842290024A8A5 /* MWMActionBarButton.mm in Sources */,
|
||||
849CF7311DE842290024A8A5 /* MWMKeyboard.mm in Sources */,
|
||||
849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */,
|
||||
|
@ -5402,7 +5398,6 @@
|
|||
849CF7561DE842290024A8A5 /* MWMRoutingDisclaimerAlert.mm in Sources */,
|
||||
849CF7571DE842290024A8A5 /* MWMMigrationViewController.mm in Sources */,
|
||||
849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */,
|
||||
345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */,
|
||||
849CF7591DE842290024A8A5 /* MWMMapDownloaderDefaultDataSource.mm in Sources */,
|
||||
849CF75B1DE842290024A8A5 /* MWMSearchBookmarksCell.mm in Sources */,
|
||||
849CF75C1DE842290024A8A5 /* MWMNavigationView.mm in Sources */,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@interface LinkCell : MWMTableViewCell
|
||||
|
||||
@property(nonatomic) IBOutlet UILabel * titleLabel;
|
||||
@property(nonatomic) IBOutlet UILabel * infoLabel;
|
||||
|
||||
@end
|
|
@ -1,12 +0,0 @@
|
|||
#import "LinkCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
@implementation LinkCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.backgroundColor = [UIColor white];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,7 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@interface SelectableCell : MWMTableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * titleLabel;
|
||||
|
||||
@end
|
|
@ -1,12 +0,0 @@
|
|||
#import "SelectableCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
@implementation SelectableCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.backgroundColor = [UIColor white];
|
||||
}
|
||||
|
||||
@end
|
29
iphone/Maps/Settings/Cells/SettingsTableViewLinkCell.swift
Normal file
29
iphone/Maps/Settings/Cells/SettingsTableViewLinkCell.swift
Normal file
|
@ -0,0 +1,29 @@
|
|||
@objc final class SettingsTableViewLinkCell: MWMTableViewCell {
|
||||
|
||||
static let cellId = "SettingsTableViewLinkCell"
|
||||
|
||||
@IBOutlet fileprivate weak var title: UILabel!
|
||||
@IBOutlet fileprivate weak var info: UILabel!
|
||||
|
||||
func config(title: String, info: String?) {
|
||||
backgroundColor = UIColor.white()
|
||||
|
||||
self.title.text = title
|
||||
styleTitle()
|
||||
|
||||
self.info.text = info
|
||||
self.info.isHidden = info == nil
|
||||
styleInfo()
|
||||
}
|
||||
|
||||
fileprivate func styleTitle() {
|
||||
title.textColor = UIColor.blackPrimaryText()
|
||||
title.font = UIFont.regular17()
|
||||
}
|
||||
|
||||
fileprivate func styleInfo() {
|
||||
info.textColor = UIColor.blackSecondaryText()
|
||||
info.font = UIFont.regular17()
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
@objc final class SettingsTableViewSelectableCell: MWMTableViewCell {
|
||||
|
||||
static let cellId = "SettingsTableViewSelectableCell"
|
||||
|
||||
@IBOutlet fileprivate weak var title: UILabel!
|
||||
|
||||
func config(title: String) {
|
||||
backgroundColor = UIColor.white()
|
||||
|
||||
self.title.text = title
|
||||
styleTitle()
|
||||
}
|
||||
|
||||
fileprivate func styleTitle() {
|
||||
title.textColor = UIColor.blackPrimaryText()
|
||||
title.font = UIFont.regular17()
|
||||
}
|
||||
|
||||
}
|
45
iphone/Maps/Settings/Cells/SettingsTableViewSwitchCell.swift
Normal file
45
iphone/Maps/Settings/Cells/SettingsTableViewSwitchCell.swift
Normal file
|
@ -0,0 +1,45 @@
|
|||
@objc protocol SettingsTableViewSwitchCellDelegate {
|
||||
|
||||
func switchCell(_ cell: SettingsTableViewSwitchCell, didChangeValue value: Bool)
|
||||
|
||||
}
|
||||
|
||||
@objc final class SettingsTableViewSwitchCell: MWMTableViewCell {
|
||||
|
||||
static let cellId = "SettingsTableViewSwitchCell"
|
||||
|
||||
@IBOutlet fileprivate weak var title: UILabel!
|
||||
@IBOutlet fileprivate weak var switchButton: UISwitch! {
|
||||
didSet {
|
||||
switchButton.addTarget(self, action: #selector(switchChanged), for: .valueChanged)
|
||||
}
|
||||
}
|
||||
|
||||
weak var delegate: SettingsTableViewSwitchCellDelegate?
|
||||
|
||||
func config(delegate: SettingsTableViewSwitchCellDelegate, title: String, isOn: Bool) {
|
||||
backgroundColor = UIColor.white()
|
||||
|
||||
self.delegate = delegate
|
||||
|
||||
self.title.text = title
|
||||
styleTitle()
|
||||
|
||||
self.switchButton.isOn = isOn
|
||||
styleSwitchButton()
|
||||
}
|
||||
|
||||
@IBAction fileprivate func switchChanged() {
|
||||
delegate?.switchCell(self, didChangeValue: switchButton.isOn)
|
||||
}
|
||||
|
||||
fileprivate func styleTitle() {
|
||||
title.textColor = UIColor.blackPrimaryText()
|
||||
title.font = UIFont.regular17()
|
||||
}
|
||||
|
||||
fileprivate func styleSwitchButton() {
|
||||
switchButton.onTintColor = UIColor.linkBlue()
|
||||
}
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@class SwitchCell;
|
||||
@protocol SwitchCellDelegate <NSObject>
|
||||
|
||||
- (void)switchCell:(SwitchCell *)cell didChangeValue:(BOOL)value;
|
||||
|
||||
@end
|
||||
|
||||
@interface SwitchCell : MWMTableViewCell
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UILabel * titleLabel;
|
||||
@property(weak, nonatomic) IBOutlet UISwitch * switchButton;
|
||||
|
||||
@property(weak, nonatomic) id<SwitchCellDelegate> delegate;
|
||||
|
||||
@end
|
|
@ -1,18 +0,0 @@
|
|||
#import "SwitchCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
@implementation SwitchCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
[self.switchButton addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged];
|
||||
self.backgroundColor = [UIColor white];
|
||||
}
|
||||
|
||||
- (void)switchChanged:(UISwitch *)sender
|
||||
{
|
||||
[self.delegate switchCell:self didChangeValue:sender.on];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,8 +1,8 @@
|
|||
#import "MWMAboutController.h"
|
||||
#import "AppInfo.h"
|
||||
#import "LinkCell.h"
|
||||
#import "MWMMailViewController.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "WebViewController.h"
|
||||
|
||||
#import "3party/Alohalytics/src/alohalytics_objc.h"
|
||||
|
@ -18,13 +18,13 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
@property(weak, nonatomic) IBOutlet UILabel * versionLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * dateLabel;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * websiteCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * blogCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * facebookCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * twitterCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * subscribeCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * rateCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * copyrightCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * websiteCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * blogCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * facebookCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * twitterCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * subscribeCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * rateCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * copyrightCell;
|
||||
|
||||
@property(nonatomic) IBOutlet UIView * headerView;
|
||||
|
||||
|
@ -56,7 +56,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
LinkCell * cell = static_cast<LinkCell *>([tableView cellForRowAtIndexPath:indexPath]);
|
||||
auto cell = static_cast<SettingsTableViewLinkCell *>([tableView cellForRowAtIndexPath:indexPath]);
|
||||
if (cell == self.websiteCell)
|
||||
{
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"website"];
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
#import "MWMMobileInternetViewController.h"
|
||||
#import "MWMNetworkPolicy.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
using namespace network_policy;
|
||||
using np = platform::NetworkPolicy;
|
||||
|
||||
@interface MWMMobileInternetViewController ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * always;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * ask;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * never;
|
||||
@property(weak, nonatomic) SelectableCell * selected;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * always;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * ask;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * never;
|
||||
@property(weak, nonatomic) SettingsTableViewSelectableCell * selected;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -22,7 +22,7 @@ using np = platform::NetworkPolicy;
|
|||
[super viewDidLoad];
|
||||
self.title = L(@"mobile_data");
|
||||
|
||||
SelectableCell * selected;
|
||||
SettingsTableViewSelectableCell * selected;
|
||||
switch (GetStage())
|
||||
{
|
||||
case np::Stage::Always: selected = self.always; break;
|
||||
|
@ -33,7 +33,7 @@ using np = platform::NetworkPolicy;
|
|||
self.selected = selected;
|
||||
}
|
||||
|
||||
- (void)setSelected:(SelectableCell *)selected
|
||||
- (void)setSelected:(SettingsTableViewSelectableCell *)selected
|
||||
{
|
||||
if ([_selected isEqual:selected])
|
||||
return;
|
||||
|
@ -61,7 +61,7 @@ using np = platform::NetworkPolicy;
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SelectableCell * selected = self.selected;
|
||||
SettingsTableViewSelectableCell * selected = self.selected;
|
||||
selected.accessoryType = UITableViewCellAccessoryNone;
|
||||
selected = [tableView cellForRowAtIndexPath:indexPath];
|
||||
selected.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
#import "MWMNightModeController.h"
|
||||
#import "MWMSettings.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
@interface MWMNightModeController ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * autoSwitch;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * on;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * off;
|
||||
@property(weak, nonatomic) SelectableCell * selectedCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * autoSwitch;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * on;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * off;
|
||||
@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setSelectedCell:(SelectableCell *)cell
|
||||
- (void)setSelectedCell:(SettingsTableViewSelectableCell *)cell
|
||||
{
|
||||
if ([_selectedCell isEqual:cell])
|
||||
return;
|
||||
|
@ -91,7 +91,7 @@
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SelectableCell * selectedCell = self.selectedCell;
|
||||
SettingsTableViewSelectableCell * selectedCell = self.selectedCell;
|
||||
selectedCell.accessoryType = UITableViewCellAccessoryNone;
|
||||
selectedCell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
selectedCell.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#import "MWMRecentTrackSettingsController.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
|
@ -12,13 +12,13 @@ typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve
|
|||
|
||||
@interface MWMRecentTrackSettingsController ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * none;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * oneHour;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * twoHours;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * sixHours;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * twelveHours;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * oneDay;
|
||||
@property(weak, nonatomic) SelectableCell * selectedCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * none;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * oneHour;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * twoHours;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * sixHours;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * twelveHours;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * oneDay;
|
||||
@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -48,7 +48,7 @@ typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve
|
|||
self.selectedCell.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
}
|
||||
|
||||
- (void)setSelectedCell:(SelectableCell *)selectedCell
|
||||
- (void)setSelectedCell:(SettingsTableViewSelectableCell *)selectedCell
|
||||
{
|
||||
_selectedCell = selectedCell;
|
||||
auto & f = GetFramework();
|
||||
|
@ -90,7 +90,7 @@ typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SelectableCell * selectedCell = self.selectedCell;
|
||||
SettingsTableViewSelectableCell * selectedCell = self.selectedCell;
|
||||
selectedCell.accessoryType = UITableViewCellAccessoryNone;
|
||||
selectedCell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
selectedCell.selected = NO;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#import "MWMSettingsViewController.h"
|
||||
#import "LinkCell.h"
|
||||
#import "LocaleTranslator.h"
|
||||
#import "MWMAuthorizationCommon.h"
|
||||
#import "MWMNetworkPolicy.h"
|
||||
#import "MWMSettings.h"
|
||||
#import "MWMTextToSpeech.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwitchCell.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "WebViewController.h"
|
||||
|
||||
#import "3party/Alohalytics/src/alohalytics_objc.h"
|
||||
|
@ -17,27 +16,27 @@
|
|||
|
||||
extern NSString * const kAlohalyticsTapEventKey;
|
||||
|
||||
@interface MWMSettingsViewController ()<SwitchCellDelegate>
|
||||
@interface MWMSettingsViewController ()<SettingsTableViewSwitchCellDelegate>
|
||||
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * profileCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * profileCell;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * unitsCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * zoomButtonsCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * is3dCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * autoDownloadCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * mobileInternetCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * recentTrackCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * compassCalibrationCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * showOffersCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * statisticsCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * unitsCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * zoomButtonsCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * is3dCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * autoDownloadCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * mobileInternetCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * recentTrackCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * compassCalibrationCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * showOffersCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * statisticsCell;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * nightModeCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * perspectiveViewCell;
|
||||
@property(weak, nonatomic) IBOutlet SwitchCell * autoZoomCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * voiceInstructionsCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * nightModeCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * perspectiveViewCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSwitchCell * autoZoomCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * voiceInstructionsCell;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * helpCell;
|
||||
@property(weak, nonatomic) IBOutlet LinkCell * aboutCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * helpCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewLinkCell * aboutCell;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -60,92 +59,128 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self configProfileSection];
|
||||
[self configCommonSection];
|
||||
[self configNavigationSection];
|
||||
[self configInfoSection];
|
||||
}
|
||||
|
||||
- (void)configProfileSection
|
||||
{
|
||||
NSString * userName = osm_auth_ios::OSMUserName();
|
||||
self.profileCell.infoLabel.text = userName.length != 0 ? userName : @"";
|
||||
[self.profileCell configWithTitle:L(@"profile") info:userName.length != 0 ? userName : @""];
|
||||
}
|
||||
|
||||
- (void)configCommonSection
|
||||
{
|
||||
switch ([MWMSettings measurementUnits])
|
||||
{
|
||||
case measurement_utils::Units::Metric: self.unitsCell.infoLabel.text = L(@"kilometres"); break;
|
||||
case measurement_utils::Units::Imperial: self.unitsCell.infoLabel.text = L(@"miles"); break;
|
||||
case measurement_utils::Units::Metric:
|
||||
[self.unitsCell configWithTitle:L(@"measurement_units") info:L(@"kilometres")];
|
||||
break;
|
||||
case measurement_utils::Units::Imperial:
|
||||
[self.unitsCell configWithTitle:L(@"measurement_units") info:L(@"miles")];
|
||||
break;
|
||||
}
|
||||
|
||||
self.zoomButtonsCell.switchButton.on = [MWMSettings zoomButtonsEnabled];
|
||||
self.zoomButtonsCell.delegate = self;
|
||||
[self.zoomButtonsCell configWithDelegate:self
|
||||
title:L(@"pref_zoom_title")
|
||||
isOn:[MWMSettings zoomButtonsEnabled]];
|
||||
|
||||
bool on = true, _ = true;
|
||||
GetFramework().Load3dMode(_, on);
|
||||
self.is3dCell.switchButton.on = on;
|
||||
self.is3dCell.delegate = self;
|
||||
[self.is3dCell configWithDelegate:self title:L(@"pref_map_3d_buildings_title") isOn:on];
|
||||
|
||||
self.autoDownloadCell.switchButton.on = [MWMSettings autoDownloadEnabled];
|
||||
self.autoDownloadCell.delegate = self;
|
||||
[self.autoDownloadCell configWithDelegate:self
|
||||
title:L(@"autodownload")
|
||||
isOn:[MWMSettings autoDownloadEnabled]];
|
||||
|
||||
NSString * internetLabel = nil;
|
||||
using np = platform::NetworkPolicy;
|
||||
using stage = platform::NetworkPolicy::Stage;
|
||||
switch (network_policy::GetStage())
|
||||
{
|
||||
case np::Stage::Always: internetLabel = L(@"mobile_data_option_always"); break;
|
||||
case np::Stage::Session: internetLabel = L(@"mobile_data_option_today"); break;
|
||||
case np::Stage::Never: internetLabel = L(@"mobile_data_option_never"); break;
|
||||
case stage::Always:
|
||||
[self.mobileInternetCell configWithTitle:L(@"mobile_data")
|
||||
info:L(@"mobile_data_option_always")];
|
||||
break;
|
||||
case stage::Session:
|
||||
[self.mobileInternetCell configWithTitle:L(@"mobile_data") info:L(@"mobile_data_option_today")];
|
||||
break;
|
||||
case stage::Never:
|
||||
[self.mobileInternetCell configWithTitle:L(@"mobile_data") info:L(@"mobile_data_option_never")];
|
||||
break;
|
||||
}
|
||||
self.mobileInternetCell.infoLabel.text = internetLabel;
|
||||
|
||||
if (!GpsTracker::Instance().IsEnabled())
|
||||
{
|
||||
self.recentTrackCell.infoLabel.text = L(@"duration_disabled");
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_disabled")];
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GpsTracker::Instance().GetDuration().count())
|
||||
{
|
||||
case 1: self.recentTrackCell.infoLabel.text = L(@"duration_1_hour"); break;
|
||||
case 2: self.recentTrackCell.infoLabel.text = L(@"duration_2_hours"); break;
|
||||
case 6: self.recentTrackCell.infoLabel.text = L(@"duration_6_hours"); break;
|
||||
case 12: self.recentTrackCell.infoLabel.text = L(@"duration_12_hours"); break;
|
||||
case 24: self.recentTrackCell.infoLabel.text = L(@"duration_1_day"); break;
|
||||
case 1:
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_1_hour")];
|
||||
break;
|
||||
case 2:
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_2_hours")];
|
||||
break;
|
||||
case 6:
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_6_hours")];
|
||||
break;
|
||||
case 12:
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_12_hours")];
|
||||
break;
|
||||
case 24:
|
||||
[self.recentTrackCell configWithTitle:L(@"pref_track_record_title")
|
||||
info:L(@"duration_1_day")];
|
||||
break;
|
||||
default: NSAssert(false, @"Incorrect hours value"); break;
|
||||
}
|
||||
}
|
||||
|
||||
self.compassCalibrationCell.switchButton.on = [MWMSettings compassCalibrationEnabled];
|
||||
self.compassCalibrationCell.delegate = self;
|
||||
[self.compassCalibrationCell configWithDelegate:self
|
||||
title:L(@"pref_calibration_title")
|
||||
isOn:[MWMSettings compassCalibrationEnabled]];
|
||||
|
||||
self.showOffersCell.switchButton.on = ![MWMSettings adForbidden];
|
||||
self.showOffersCell.delegate = self;
|
||||
[self.showOffersCell configWithDelegate:self
|
||||
title:L(@"showcase_settings_title")
|
||||
isOn:![MWMSettings adForbidden]];
|
||||
|
||||
self.statisticsCell.switchButton.on = [MWMSettings statisticsEnabled];
|
||||
self.statisticsCell.delegate = self;
|
||||
[self.statisticsCell configWithDelegate:self
|
||||
title:L(@"allow_statistics")
|
||||
isOn:[MWMSettings statisticsEnabled]];
|
||||
}
|
||||
|
||||
- (void)configNavigationSection
|
||||
{
|
||||
if ([MWMSettings autoNightModeEnabled])
|
||||
{
|
||||
self.nightModeCell.infoLabel.text = L(@"pref_map_style_auto");
|
||||
[self.nightModeCell configWithTitle:L(@"pref_map_style_title") info:L(@"pref_map_style_auto")];
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (GetFramework().GetMapStyle())
|
||||
{
|
||||
case MapStyleDark: self.nightModeCell.infoLabel.text = L(@"pref_map_style_night"); break;
|
||||
default: self.nightModeCell.infoLabel.text = L(@"pref_map_style_default"); break;
|
||||
case MapStyleDark:
|
||||
[self.nightModeCell configWithTitle:L(@"pref_map_style_title")
|
||||
info:L(@"pref_map_style_night")];
|
||||
break;
|
||||
default:
|
||||
[self.nightModeCell configWithTitle:L(@"pref_map_style_title")
|
||||
info:L(@"pref_map_style_default")];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool _ = true, on = true;
|
||||
GetFramework().Load3dMode(on, _);
|
||||
self.perspectiveViewCell.switchButton.on = on;
|
||||
self.perspectiveViewCell.delegate = self;
|
||||
[self.perspectiveViewCell configWithDelegate:self title:L(@"pref_map_3d_title") isOn:on];
|
||||
|
||||
self.autoZoomCell.switchButton.on = GetFramework().LoadAutoZoom();
|
||||
self.autoZoomCell.delegate = self;
|
||||
[self.autoZoomCell configWithDelegate:self
|
||||
title:L(@"pref_map_auto_zoom")
|
||||
isOn:GetFramework().LoadAutoZoom()];
|
||||
|
||||
if ([MWMTextToSpeech isTTSEnabled])
|
||||
{
|
||||
|
@ -154,22 +189,29 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
string const savedLanguageTwine = locale_translator::bcp47ToTwineLanguage(savedLanguage);
|
||||
NSString * language = @(tts::translatedTwine(savedLanguageTwine).c_str());
|
||||
self.voiceInstructionsCell.infoLabel.text = language;
|
||||
[self.voiceInstructionsCell configWithTitle:L(@"pref_tts_language_title") info:language];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.voiceInstructionsCell.infoLabel.text = @"";
|
||||
[self.voiceInstructionsCell configWithTitle:L(@"pref_tts_language_title") info:nil];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.voiceInstructionsCell.infoLabel.text = L(@"duration_disabled");
|
||||
[self.voiceInstructionsCell configWithTitle:L(@"pref_tts_language_title")
|
||||
info:L(@"duration_disabled")];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - SwitchCellDelegate
|
||||
- (void)configInfoSection
|
||||
{
|
||||
[self.helpCell configWithTitle:L(@"help") info:nil];
|
||||
[self.aboutCell configWithTitle:L(@"about_menu_title") info:nil];
|
||||
}
|
||||
|
||||
- (void)switchCell:(SwitchCell *)cell didChangeValue:(BOOL)value
|
||||
#pragma mark - SettingsTableViewSwitchCellDelegate
|
||||
|
||||
- (void)switchCell:(SettingsTableViewSwitchCell *)cell didChangeValue:(BOOL)value
|
||||
{
|
||||
if (cell == self.zoomButtonsCell)
|
||||
{
|
||||
|
@ -240,7 +282,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
LinkCell * cell = static_cast<LinkCell *>([tableView cellForRowAtIndexPath:indexPath]);
|
||||
auto cell = static_cast<SettingsTableViewLinkCell *>([tableView cellForRowAtIndexPath:indexPath]);
|
||||
if (cell == self.profileCell)
|
||||
{
|
||||
[Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatAuthorization}];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#import "MWMTextToSpeech.h"
|
||||
#import "MWMTTSLanguageViewController.h"
|
||||
#import "MWMTTSSettingsViewController.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "MWMTextToSpeech.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings";
|
||||
|
@ -15,7 +15,7 @@ static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings";
|
|||
self.tableView.separatorColor = [UIColor blackDividers];
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SelectableCell *)sender
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SettingsTableViewSelectableCell *)sender
|
||||
{
|
||||
if (![segue.identifier isEqualToString:kUnwingSegueIdentifier])
|
||||
return;
|
||||
|
@ -31,10 +31,14 @@ static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings";
|
|||
return [[MWMTextToSpeech tts] availableLanguages].size();
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView
|
||||
cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
SelectableCell * cell = (SelectableCell *)[tableView dequeueReusableCellWithIdentifier:[SelectableCell className]];
|
||||
cell.titleLabel.text = @([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str());
|
||||
auto cellId = [SettingsTableViewSelectableCell cellId];
|
||||
auto cell = static_cast<SettingsTableViewSelectableCell *>(
|
||||
[tableView dequeueReusableCellWithIdentifier:cellId]);
|
||||
[cell
|
||||
configWithTitle:@([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str())];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#import "MWMTableViewController.h"
|
||||
|
||||
#include "std/utility.hpp"
|
||||
#include "std/string.hpp"
|
||||
#include "std/utility.hpp"
|
||||
|
||||
@interface MWMTTSSettingsViewController : MWMTableViewController
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#import "MWMTTSSettingsViewController.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "LinkCell.h"
|
||||
#import "MWMTextToSpeech.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
#import "WebViewController.h"
|
||||
|
||||
|
@ -110,10 +109,12 @@ using namespace locale_translator;
|
|||
{
|
||||
if (indexPath.row == 0)
|
||||
{
|
||||
SelectableCell * cell = (SelectableCell *)[tableView
|
||||
dequeueReusableCellWithIdentifier:[SelectableCell className]];
|
||||
cell.titleLabel.text = L(@"duration_disabled");
|
||||
cell.accessoryType = [MWMTextToSpeech isTTSEnabled] ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark;
|
||||
auto cellId = [SettingsTableViewSelectableCell cellId];
|
||||
auto cell = static_cast<SettingsTableViewSelectableCell *>(
|
||||
[tableView dequeueReusableCellWithIdentifier:cellId]);
|
||||
[cell configWithTitle:L(@"duration_disabled")];
|
||||
cell.accessoryType = [MWMTextToSpeech isTTSEnabled] ? UITableViewCellAccessoryNone
|
||||
: UITableViewCellAccessoryCheckmark;
|
||||
return cell;
|
||||
}
|
||||
else
|
||||
|
@ -121,17 +122,19 @@ using namespace locale_translator;
|
|||
NSInteger const row = indexPath.row - 1;
|
||||
if (row == _languages.size())
|
||||
{
|
||||
LinkCell * cell =
|
||||
(LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]];
|
||||
cell.titleLabel.text = L(@"pref_tts_other_section_title");
|
||||
auto cellId = [SettingsTableViewLinkCell cellId];
|
||||
auto cell = static_cast<SettingsTableViewLinkCell *>(
|
||||
[tableView dequeueReusableCellWithIdentifier:cellId]);
|
||||
[cell configWithTitle:L(@"pref_tts_other_section_title") info:nil];
|
||||
return cell;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectableCell * cell = (SelectableCell *)[tableView
|
||||
dequeueReusableCellWithIdentifier:[SelectableCell className]];
|
||||
auto cellId = [SettingsTableViewSelectableCell cellId];
|
||||
auto cell = static_cast<SettingsTableViewSelectableCell *>(
|
||||
[tableView dequeueReusableCellWithIdentifier:cellId]);
|
||||
pair<string, string> const p = _languages[row];
|
||||
cell.titleLabel.text = @(p.second.c_str());
|
||||
[cell configWithTitle:@(p.second.c_str())];
|
||||
BOOL const isSelected =
|
||||
[@(p.first.c_str()) isEqualToString:[MWMTextToSpeech savedLanguage]];
|
||||
cell.accessoryType = [MWMTextToSpeech isTTSEnabled] && isSelected
|
||||
|
@ -143,9 +146,10 @@ using namespace locale_translator;
|
|||
}
|
||||
else
|
||||
{
|
||||
LinkCell * cell =
|
||||
(LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]];
|
||||
cell.titleLabel.text = L(@"pref_tts_how_to_set_up_voice");
|
||||
auto cellId = [SettingsTableViewLinkCell cellId];
|
||||
auto cell = static_cast<SettingsTableViewLinkCell *>(
|
||||
[tableView dequeueReusableCellWithIdentifier:cellId]);
|
||||
[cell configWithTitle:L(@"pref_tts_how_to_set_up_voice") info:nil];
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#import "MWMUnitsController.h"
|
||||
#import "MWMSettings.h"
|
||||
#import "SelectableCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "SwiftBridge.h"
|
||||
|
||||
@interface MWMUnitsController ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * kilometers;
|
||||
@property(weak, nonatomic) IBOutlet SelectableCell * miles;
|
||||
@property(weak, nonatomic) SelectableCell * selectedCell;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * kilometers;
|
||||
@property(weak, nonatomic) IBOutlet SettingsTableViewSelectableCell * miles;
|
||||
@property(weak, nonatomic) SettingsTableViewSelectableCell * selectedCell;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setSelectedCell:(SelectableCell *)cell
|
||||
- (void)setSelectedCell:(SettingsTableViewSelectableCell *)cell
|
||||
{
|
||||
SelectableCell * selectedCell = _selectedCell;
|
||||
SettingsTableViewSelectableCell * selectedCell = _selectedCell;
|
||||
if (selectedCell == cell)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue