DBMenuTableViewController.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // The MIT License
  2. //
  3. // Copyright (c) 2016 Dariusz Bukowski
  4. //
  5. // Permission is hereby granted, free of charge, to any person obtaining a copy
  6. // of this software and associated documentation files (the "Software"), to deal
  7. // in the Software without restriction, including without limitation the rights
  8. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. // copies of the Software, and to permit persons to whom the Software is
  10. // furnished to do so, subject to the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be included in
  13. // all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. // THE SOFTWARE.
  22. #import <UIKit/UIKit.h>
  23. #import "DBPerformanceToolkit.h"
  24. #import "DBConsoleOutputCaptor.h"
  25. #import "DBBuildInfoProvider.h"
  26. #import "DBDeviceInfoProvider.h"
  27. #import "DBNetworkToolkit.h"
  28. #import "DBUserInterfaceToolkit.h"
  29. #import "DBLocationToolkit.h"
  30. #import "DBCoreDataToolkit.h"
  31. #import "DBCustomAction.h"
  32. #import "DBCustomVariable.h"
  33. #import "DBCrashReportsToolkit.h"
  34. @class DBMenuTableViewController;
  35. /**
  36. A protocol used to communicate between `DBMenuTableViewController` object and the object that presented it.
  37. */
  38. @protocol DBMenuTableViewControllerDelegate <NSObject>
  39. /**
  40. Informs the delegate that the user tapped `Close` button in the `DBMenuTableViewController`.
  41. @param menuTableViewController `DBMenuTableViewController` object that should be dismissed.
  42. */
  43. - (void)menuTableViewControllerDidTapClose:(DBMenuTableViewController *)menuTableViewController;
  44. @end
  45. /**
  46. `DBMenuTableViewController` is the main view controller used by `DBDebugToolkit`. It contains a `UITableView` containing all the debug tools.
  47. */
  48. @interface DBMenuTableViewController : UITableViewController
  49. /**
  50. The delegate adopting `DBMenuTableViewControllerDelegate` protocol.
  51. */
  52. @property (nonatomic, weak) id <DBMenuTableViewControllerDelegate> delegate;
  53. /**
  54. `DBPerformanceToolkit` instance that will be passed on.
  55. */
  56. @property (nonatomic, strong) DBPerformanceToolkit *performanceToolkit;
  57. /**
  58. `DBConsoleOutputCaptor` instance that will be passed on.
  59. */
  60. @property (nonatomic, strong) DBConsoleOutputCaptor *consoleOutputCaptor;
  61. /**
  62. `DBNetworkToolkit` instance that will be passed on.
  63. */
  64. @property (nonatomic, strong) DBNetworkToolkit *networkToolkit;
  65. /**
  66. `DBUserInterfaceToolkit` instance that will be passed on.
  67. */
  68. @property (nonatomic, strong) DBUserInterfaceToolkit *userInterfaceToolkit;
  69. /**
  70. `DBLocationToolkit` instance that will be passed on.
  71. */
  72. @property (nonatomic, strong) DBLocationToolkit *locationToolkit;
  73. /**
  74. `DBCoreDataToolkit` instance that will be passed on.
  75. */
  76. @property (nonatomic, strong) DBCoreDataToolkit *coreDataToolkit;
  77. /**
  78. `DBBuildInfoProvider` instance that will provide data for section header.
  79. */
  80. @property (nonatomic, strong) DBBuildInfoProvider *buildInfoProvider;
  81. /**
  82. `DBDeviceInfoProvider` instance that will provide data for section footer.
  83. */
  84. @property (nonatomic, strong) DBDeviceInfoProvider *deviceInfoProvider;
  85. /**
  86. `DBCrashReportsToolkit` instance that will be passed on.
  87. */
  88. @property (nonatomic, strong) DBCrashReportsToolkit *crashReportsToolkit;
  89. /**
  90. Array of `DBCustomAction` instances that will be passed on.
  91. */
  92. @property (nonatomic, copy) NSArray <DBCustomAction *> *customActions;
  93. /**
  94. Array of `DBCustomVariable` instances that will be passed on.
  95. */
  96. @property (nonatomic, copy) NSArray <DBCustomVariable *> *customVariables;
  97. /**
  98. Pushes `DBPerformanceTableViewController` onto the current navigation controller with the preselected section. Optionally animated.
  99. @param section Preselected section in performance table view controller.
  100. @param animated Boolean determining whether the push should be animated or not.
  101. */
  102. - (void)openPerformanceMenuWithSection:(DBPerformanceSection)section animated:(BOOL)animated;
  103. @end