FLEXManager.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // FLEXManager.h
  3. // Flipboard
  4. //
  5. // Created by Ryan Olson on 4/4/14.
  6. // Copyright (c) 2014 Flipboard. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface FLEXManager : NSObject
  10. + (instancetype)sharedManager;
  11. @property (nonatomic, readonly) BOOL isHidden;
  12. - (void)showExplorer;
  13. - (void)hideExplorer;
  14. /// If this property is set to YES, FLEX will swizzle NSURLConnection*Delegate and NSURLSession*Delegate methods
  15. /// on classes that conform to the protocols. This allows you to view network activity history from the main FLEX menu.
  16. /// Full responses are kept temporarily in a size limited cache and may be pruged under memory pressure.
  17. @property (nonatomic, assign, getter=isNetworkDebuggingEnabled) BOOL networkDebuggingEnabled;
  18. #pragma mark - Extensions
  19. /// Adds an entry at the bottom of the list of Global State items. Call this method before this view controller is displayed.
  20. /// @param entryName The string to be displayed in the cell.
  21. /// @param objectFutureBlock When you tap on the row, information about the object returned by this block will be displayed.
  22. /// Passing a block that returns an object allows you to display information about an object whose actual pointer may change at runtime (e.g. +currentUser)
  23. /// @note This method must be called from the main thread.
  24. /// The objectFutureBlock will be invoked from the main thread and may return nil.
  25. /// @note The passed block will be copied and retain for the duration of the application, you may want to use __weak references.
  26. - (void)registerGlobalEntryWithName:(NSString *)entryName objectFutureBlock:(id (^)(void))objectFutureBlock;
  27. /// Adds an entry at the bottom of the list of Global State items. Call this method before this view controller is displayed.
  28. /// @param entryName The string to be displayed in the cell.
  29. /// @param viewControllerFutureBlock When you tap on the row, view controller returned by this block will be pushed on the navigation controller stack.
  30. /// @note This method must be called from the main thread.
  31. /// The viewControllerFutureBlock will be invoked from the main thread and may not return nil.
  32. /// @note The passed block will be copied and retain for the duration of the application, you may want to use __weak references.
  33. - (void)registerGlobalEntryWithName:(NSString *)entryName
  34. viewControllerFutureBlock:(UIViewController * (^)(void))viewControllerFutureBlock;
  35. @end