NCSettings.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. //
  2. // NCSettings.m
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 24/11/14.
  6. // Copyright (c) 2014 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. #import "NCSettings.h"
  24. #import "CCAdvanced.h"
  25. #import "CCManageAccount.h"
  26. #import "CCManageAutoUpload.h"
  27. #import "NCManageEndToEndEncryption.h"
  28. #import "NCBridgeSwift.h"
  29. #import "NSNotificationCenter+MainThread.h"
  30. #import <TOPasscodeViewController/TOPasscodeViewController.h>
  31. #define alertViewEsci 1
  32. #define alertViewAzzeraCache 2
  33. @interface NCSettings () <TOPasscodeSettingsViewControllerDelegate, TOPasscodeViewControllerDelegate>
  34. {
  35. AppDelegate *appDelegate;
  36. TOPasscodeViewController *passcodeViewController;
  37. TOPasscodeSettingsViewController *passcodeSettingsViewController;
  38. }
  39. @end
  40. @implementation NCSettings
  41. - (void)initializeForm
  42. {
  43. XLFormDescriptor *form = [XLFormDescriptor formDescriptor];
  44. XLFormSectionDescriptor *section;
  45. XLFormRowDescriptor *row;
  46. //NSInteger serverVersionMajor = [[NCManageDatabase shared] getCapabilitiesServerIntWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionMajor];
  47. form.rowNavigationOptions = XLFormRowNavigationOptionNone;
  48. // Section AUTO UPLOAD OF CAMERA IMAGES ----------------------------
  49. section = [XLFormSectionDescriptor formSection];
  50. [form addFormSection:section];
  51. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"autoUpload" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_settings_autoupload_", nil)];
  52. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  53. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  54. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  55. [row.cellConfig setObject:[[UIImage imageNamed:@"autoUpload"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  56. row.action.viewControllerClass = [CCManageAutoUpload class];
  57. [section addFormRow:row];
  58. // Section : LOCK --------------------------------------------------------------
  59. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_lock_", nil)];
  60. [form addFormSection:section];
  61. // Lock active YES/NO
  62. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"bloccopasscode" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_lock_not_active_", nil)];
  63. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  64. [row.cellConfig setObject:[[UIImage imageNamed:@"settingsPasscodeNO"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  65. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  66. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  67. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  68. //[row.cellConfig setObject:@(UITableViewCellAccessoryDisclosureIndicator) forKey:@"accessoryType"];
  69. row.action.formSelector = @selector(passcode:);
  70. [section addFormRow:row];
  71. // Enable Touch ID
  72. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"enableTouchDaceID" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_enable_touch_face_id_", nil)];
  73. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  74. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  75. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  76. [section addFormRow:row];
  77. // Lock no screen
  78. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"notPasscodeAtStart" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_lock_protection_no_screen_", nil)];
  79. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  80. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  81. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  82. [section addFormRow:row];
  83. // Section : Screen --------------------------------------------------------------
  84. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_screen_", nil)];
  85. [form addFormSection:section];
  86. // Dark Mode
  87. if (@available(iOS 13.0, *)) {
  88. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkModeDetect" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_dark_mode_detect_", nil)];
  89. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  90. [row.cellConfig setObject:[[UIImage imageNamed:@"darkModeDetect"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  91. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  92. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  93. if ([CCUtility getDarkModeDetect]) row.value = @1;
  94. else row.value = @0;
  95. [section addFormRow:row];
  96. } else {
  97. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"darkMode" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_dark_mode_", nil)];
  98. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  99. [row.cellConfig setObject:[[UIImage imageNamed:@"themeLightDark"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  100. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  101. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  102. if ([CCUtility getDarkMode]) row.value = @1;
  103. else row.value = @0;
  104. [section addFormRow:row];
  105. }
  106. // Section : E2EEncryption --------------------------------------------------------------
  107. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_e2e_settings_title_", nil)];
  108. [form addFormSection:section];
  109. // EndToEnd Encryption
  110. NSString *title = [NSString stringWithFormat:@"%@ (%@)",NSLocalizedString(@"_e2e_settings_", nil), NSLocalizedString(@"_experimental_", nil)];
  111. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"e2eEncryption" rowType:XLFormRowDescriptorTypeButton title:title];
  112. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  113. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  114. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  115. [row.cellConfig setObject:[[UIImage imageNamed:@"lock"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  116. row.action.viewControllerClass = [NCManageEndToEndEncryption class];
  117. [section addFormRow:row];
  118. // Section Advanced -------------------------------------------------
  119. section = [XLFormSectionDescriptor formSection];
  120. [form addFormSection:section];
  121. // Advanced
  122. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"advanced" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_advanced_", nil)];
  123. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  124. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  125. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  126. [row.cellConfig setObject:[[UIImage imageNamed:@"settings"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  127. row.action.viewControllerClass = [CCAdvanced class];
  128. [section addFormRow:row];
  129. // Section : INFORMATION ------------------------------------------------
  130. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_information_", nil)];
  131. [form addFormSection:section];
  132. // Acknowledgements
  133. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"buttonLeftAligned" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_acknowledgements_", nil)];
  134. row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundCell;
  135. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
  136. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  137. [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
  138. [row.cellConfig setObject:[[UIImage imageNamed:@"acknowledgements"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  139. row.action.formBlock = ^(XLFormRowDescriptor * sender){
  140. [self performSegueWithIdentifier:@"AcknowledgementsSegue" sender:sender];
  141. [self deselectFormRow:sender];
  142. };
  143. [section addFormRow:row];
  144. self.tableView.showsVerticalScrollIndicator = NO;
  145. self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 35, 0);
  146. self.form = form;
  147. }
  148. - (void)viewDidLoad
  149. {
  150. [super viewDidLoad];
  151. self.title = NSLocalizedString(@"_settings_", nil);
  152. appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  153. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:NCBrandGlobal.shared.notificationCenterChangeTheming object:nil];
  154. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground) name:NCBrandGlobal.shared.notificationCenterApplicationDidEnterBackground object:nil];
  155. [self changeTheming];
  156. }
  157. - (void)changeTheming
  158. {
  159. self.view.backgroundColor = NCBrandColor.shared.backgroundForm;
  160. self.tableView.backgroundColor = NCBrandColor.shared.backgroundForm;
  161. [self.tableView reloadData];
  162. [self initializeForm];
  163. [self reloadForm];
  164. }
  165. - (void)applicationDidEnterBackground
  166. {
  167. if (passcodeViewController.view.window != nil) {
  168. [passcodeViewController dismissViewControllerAnimated:true completion:nil];
  169. }
  170. if (passcodeSettingsViewController.view.window != nil) {
  171. [passcodeSettingsViewController dismissViewControllerAnimated:true completion:nil];
  172. }
  173. }
  174. #pragma --------------------------------------------------------------------------------------------
  175. #pragma mark === Chiamate dal Form ===
  176. #pragma --------------------------------------------------------------------------------------------
  177. - (void)reloadForm
  178. {
  179. self.form.delegate = nil;
  180. // ------------------------------------------------------------------
  181. XLFormRowDescriptor *rowBloccoPasscode = [self.form formRowWithTag:@"bloccopasscode"];
  182. XLFormRowDescriptor *rowNotPasscodeAtStart = [self.form formRowWithTag:@"notPasscodeAtStart"];
  183. XLFormRowDescriptor *rowEnableTouchDaceID = [self.form formRowWithTag:@"enableTouchDaceID"];
  184. XLFormRowDescriptor *rowDarkModeDetect = [self.form formRowWithTag:@"darkModeDetect"];
  185. XLFormRowDescriptor *rowDarkMode = [self.form formRowWithTag:@"darkMode"];
  186. // ------------------------------------------------------------------
  187. if ([[CCUtility getPasscode] length]) {
  188. rowBloccoPasscode.title = NSLocalizedString(@"_lock_active_", nil);
  189. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"settingsPasscodeYES"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  190. } else {
  191. rowBloccoPasscode.title = NSLocalizedString(@"_lock_not_active_", nil);
  192. [rowBloccoPasscode.cellConfig setObject:[[UIImage imageNamed:@"settingsPasscodeNO"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
  193. }
  194. if ([CCUtility getEnableTouchFaceID]) [rowEnableTouchDaceID setValue:@1]; else [rowEnableTouchDaceID setValue:@0];
  195. if ([CCUtility getNotPasscodeAtStart]) [rowNotPasscodeAtStart setValue:@1]; else [rowNotPasscodeAtStart setValue:@0];
  196. if ([CCUtility getDarkModeDetect]) [rowDarkModeDetect setValue:@1]; else [rowDarkModeDetect setValue:@0];
  197. if ([CCUtility getDarkMode]) [rowDarkMode setValue:@1]; else [rowDarkMode setValue:@0];
  198. // -----------------------------------------------------------------
  199. [self.tableView reloadData];
  200. self.form.delegate = self;
  201. }
  202. - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor oldValue:(id)oldValue newValue:(id)newValue
  203. {
  204. [super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
  205. if ([rowDescriptor.tag isEqualToString:@"notPasscodeAtStart"]) {
  206. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  207. [CCUtility setNotPasscodeAtStart:true];
  208. } else {
  209. [CCUtility setNotPasscodeAtStart:false];
  210. }
  211. }
  212. if ([rowDescriptor.tag isEqualToString:@"enableTouchDaceID"]) {
  213. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  214. [CCUtility setEnableTouchFaceID:true];
  215. } else {
  216. [CCUtility setEnableTouchFaceID:false];
  217. }
  218. }
  219. if ([rowDescriptor.tag isEqualToString:@"darkMode"]) {
  220. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  221. [CCUtility setDarkMode:true];
  222. } else {
  223. [CCUtility setDarkMode:false];
  224. }
  225. [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterChangeTheming object:nil];
  226. }
  227. if ([rowDescriptor.tag isEqualToString:@"darkModeDetect"]) {
  228. if ([[rowDescriptor.value valueData] boolValue] == YES) {
  229. [CCUtility setDarkModeDetect:true];
  230. // detect Dark Mode
  231. if (@available(iOS 12.0, *)) {
  232. appDelegate.preferredUserInterfaceStyle = self.traitCollection.userInterfaceStyle;
  233. if (appDelegate.preferredUserInterfaceStyle == UIUserInterfaceStyleDark) {
  234. [CCUtility setDarkMode:YES];
  235. } else {
  236. [CCUtility setDarkMode:NO];
  237. }
  238. }
  239. } else {
  240. [CCUtility setDarkModeDetect:false];
  241. [CCUtility setDarkMode:false];
  242. }
  243. [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCBrandGlobal.shared.notificationCenterChangeTheming object:nil];
  244. }
  245. }
  246. #pragma mark - Passcode -
  247. - (void)didPerformBiometricValidationRequestInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  248. {
  249. [[LAContext new] evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:[[NCBrandOptions shared] brand] reply:^(BOOL success, NSError * _Nullable error) {
  250. if (success) {
  251. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
  252. [CCUtility setPasscode:@""];
  253. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  254. [self reloadForm];
  255. });
  256. }
  257. }];
  258. }
  259. - (void)passcodeSettingsViewController:(TOPasscodeSettingsViewController *)passcodeSettingsViewController didChangeToNewPasscode:(NSString *)passcode ofType:(TOPasscodeType)type
  260. {
  261. [CCUtility setPasscode:passcode];
  262. [passcodeSettingsViewController dismissViewControllerAnimated:YES completion:nil];
  263. [self reloadForm];
  264. }
  265. - (void)didTapCancelInPasscodeViewController:(TOPasscodeViewController *)passcodeViewController
  266. {
  267. [passcodeViewController dismissViewControllerAnimated:YES completion:nil];
  268. }
  269. - (BOOL)passcodeViewController:(TOPasscodeViewController *)passcodeViewController isCorrectCode:(NSString *)code
  270. {
  271. if ([code isEqualToString:[CCUtility getPasscode]]) {
  272. [CCUtility setPasscode:@""];
  273. [self reloadForm];
  274. return YES;
  275. }
  276. return NO;
  277. }
  278. - (void)passcode:(XLFormRowDescriptor *)sender
  279. {
  280. LAContext *laContext = [LAContext new];
  281. NSError *error;
  282. [self deselectFormRow:sender];
  283. if ([[CCUtility getPasscode] length] == 0) {
  284. passcodeSettingsViewController = [[TOPasscodeSettingsViewController alloc] init];
  285. if (@available(iOS 13.0, *)) {
  286. if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
  287. passcodeSettingsViewController.style = TOPasscodeSettingsViewStyleDark;
  288. }
  289. }
  290. passcodeSettingsViewController.hideOptionsButton = YES;
  291. passcodeSettingsViewController.requireCurrentPasscode = NO;
  292. passcodeSettingsViewController.passcodeType = TOPasscodeTypeSixDigits;
  293. passcodeSettingsViewController.delegate = self;
  294. [self presentViewController:passcodeSettingsViewController animated:YES completion:nil];
  295. } else {
  296. passcodeViewController = [[TOPasscodeViewController alloc] initWithStyle:TOPasscodeViewStyleTranslucentLight passcodeType:TOPasscodeTypeSixDigits];
  297. if (@available(iOS 13.0, *)) {
  298. if ([[UITraitCollection currentTraitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark) {
  299. passcodeViewController.style = TOPasscodeViewStyleTranslucentDark;
  300. }
  301. }
  302. passcodeViewController.allowCancel = true;
  303. passcodeViewController.delegate = self;
  304. passcodeViewController.keypadButtonShowLettering = false;
  305. if (CCUtility.getEnableTouchFaceID && [laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {
  306. if (error == NULL) {
  307. if (laContext.biometryType == LABiometryTypeFaceID) {
  308. passcodeViewController.biometryType = TOPasscodeBiometryTypeFaceID;
  309. passcodeViewController.allowBiometricValidation = true;
  310. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  311. } else if (laContext.biometryType == LABiometryTypeTouchID) {
  312. passcodeViewController.biometryType = TOPasscodeBiometryTypeTouchID;
  313. passcodeViewController.allowBiometricValidation = true;
  314. passcodeViewController.automaticallyPromptForBiometricValidation = true;
  315. } else {
  316. NSLog(@"No Biometric support");
  317. }
  318. }
  319. }
  320. [self presentViewController:passcodeViewController animated:YES completion:nil];
  321. }
  322. }
  323. #pragma --------------------------------------------------------------------------------------------
  324. #pragma mark === Table View ===
  325. #pragma --------------------------------------------------------------------------------------------
  326. - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
  327. {
  328. NSString *sectionName;
  329. switch (section)
  330. {
  331. case 1: {
  332. sectionName = NSLocalizedString(@"_lock_protection_no_screen_footer_", nil);
  333. }
  334. break;
  335. case 5: {
  336. NSString *versionServer = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesVersionString];
  337. NSString *themingName = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingName];
  338. NSString *themingSlogan = [[NCManageDatabase shared] getCapabilitiesServerStringWithAccount:appDelegate.account elements:NCElementsJSON.shared.capabilitiesThemingSlogan];
  339. NSString *versionNextcloud = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudServer, versionServer];
  340. NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, NCUtility.shared.getVersionApp];
  341. NSString *nameSlogan = [NSString stringWithFormat:@"%@ - %@", themingName, themingSlogan];
  342. sectionName = [NSString stringWithFormat:@"\n%@\n\n%@\n%@", versionNextcloudiOS, versionNextcloud, nameSlogan];
  343. }
  344. break;
  345. }
  346. return sectionName;
  347. }
  348. @end