CCManageHelp.m 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // CCManageHelp.m
  3. // Crypto Cloud Technology Nextcloud
  4. //
  5. // Created by Marino Faggiana on 06/11/15.
  6. // Copyright (c) 2014 TWS. All rights reserved.
  7. //
  8. // Author Marino Faggiana <m.faggiana@twsweb.it>
  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 "CCManageHelp.h"
  24. #import "CCUtility.h"
  25. #import "AppDelegate.h"
  26. @interface CCManageHelp ()
  27. @end
  28. @implementation CCManageHelp
  29. - (id)initWithCoder:(NSCoder *)aDecoder
  30. {
  31. self = [super initWithCoder:aDecoder];
  32. if (self) {
  33. [self initializeForm];
  34. }
  35. return self;
  36. }
  37. - (void)initializeForm
  38. {
  39. XLFormDescriptor *form ;
  40. XLFormSectionDescriptor *section;
  41. XLFormRowDescriptor *row;
  42. form = [XLFormDescriptor formDescriptorWithTitle:NSLocalizedString(@"_help_", nil)];
  43. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_help_tutorial_", nil)];
  44. [form addFormSection:section];
  45. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"intro" rowType:XLFormRowDescriptorTypeButton title:[CCUtility localizableBrand:@"_help_intro_" table:nil]];
  46. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
  47. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  48. [row.cellConfig setObject:COLOR_BRAND forKey:@"textLabel.textColor"];
  49. row.action.formSelector = @selector(intro:);
  50. [section addFormRow:row];
  51. section = [XLFormSectionDescriptor formSection];
  52. [form addFormSection:section];
  53. self.form = form;
  54. }
  55. - (void)viewDidLoad
  56. {
  57. [super viewDidLoad];
  58. // Color
  59. [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
  60. [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
  61. // Intro
  62. self.intro = [[CCIntro alloc] initWithDelegate:self delegateView:self.splitViewController.view];
  63. }
  64. // Apparirà
  65. - (void)viewWillAppear:(BOOL)animated
  66. {
  67. [super viewWillAppear:animated];
  68. // Color
  69. [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar encrypted:NO online:[app.reachability isReachable] hidden:NO];
  70. [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
  71. }
  72. - (void)intro:(XLFormRowDescriptor *)sender
  73. {
  74. [self deselectFormRow:sender];
  75. [self.intro showIntroCryptoCloud:0.1];
  76. }
  77. @end