CCManageHelp.m 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. @interface CCManageHelp ()
  26. @end
  27. @implementation CCManageHelp
  28. - (id)initWithCoder:(NSCoder *)aDecoder
  29. {
  30. self = [super initWithCoder:aDecoder];
  31. if (self) {
  32. [self initializeForm];
  33. }
  34. return self;
  35. }
  36. - (void)initializeForm
  37. {
  38. XLFormDescriptor *form ;
  39. XLFormSectionDescriptor *section;
  40. XLFormRowDescriptor *row;
  41. form = [XLFormDescriptor formDescriptorWithTitle:NSLocalizedString(@"_help_", nil)];
  42. section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_help_tutorial_", nil)];
  43. [form addFormSection:section];
  44. row = [XLFormRowDescriptor formRowDescriptorWithTag:@"intro" rowType:XLFormRowDescriptorTypeButton title:[CCUtility localizableBrand:@"_help_intro_" table:nil]];
  45. [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
  46. [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
  47. row.action.formSelector = @selector(intro:);
  48. [section addFormRow:row];
  49. section = [XLFormSectionDescriptor formSection];
  50. [form addFormSection:section];
  51. self.form = form;
  52. }
  53. - (void)viewDidLoad
  54. {
  55. [super viewDidLoad];
  56. // Color
  57. [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar hidden:NO];
  58. [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
  59. // Intro
  60. self.intro = [[CCIntro alloc] initWithDelegate:self delegateView:self.splitViewController.view];
  61. }
  62. // Apparirà
  63. - (void)viewWillAppear:(BOOL)animated
  64. {
  65. [super viewWillAppear:animated];
  66. // Color
  67. [CCAspect aspectNavigationControllerBar:self.navigationController.navigationBar hidden:NO];
  68. [CCAspect aspectTabBar:self.tabBarController.tabBar hidden:NO];
  69. }
  70. - (void)intro:(XLFormRowDescriptor *)sender
  71. {
  72. [self deselectFormRow:sender];
  73. [self.intro showIntroCryptoCloud:0.1];
  74. }
  75. @end