FLEXGlobalsTableViewController.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // FLEXGlobalsTableViewController.h
  3. // Flipboard
  4. //
  5. // Created by Ryan Olson on 2014-05-03.
  6. // Copyright (c) 2014 Flipboard. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @protocol FLEXGlobalsTableViewControllerDelegate;
  10. @interface FLEXGlobalsTableViewController : UITableViewController
  11. @property (nonatomic, weak) id <FLEXGlobalsTableViewControllerDelegate> delegate;
  12. /// We pretend that one of the app's windows is still the key window, even though the explorer window may have become key.
  13. /// We want to display debug state about the application, not about this tool.
  14. + (void)setApplicationWindow:(UIWindow *)applicationWindow;
  15. /// Adds an entry at the bottom of the list of Global State items. Call this method before this view controller is displayed.
  16. /// @param entryName The string to be displayed in the cell.
  17. /// @param objectFutureBlock When you tap on the row, information about the object returned by this block will be displayed.
  18. /// 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)
  19. /// @note This method must be called from the main thread.
  20. /// The objectFutureBlock will be invoked from the main thread and may return nil.
  21. /// @note The passed block will be copied and retain for the duration of the application, you may want to use __weak references.
  22. + (void)registerGlobalEntryWithName:(NSString *)entryName objectFutureBlock:(id(^)(void))objectFutureBlock;
  23. @end
  24. @protocol FLEXGlobalsTableViewControllerDelegate <NSObject>
  25. - (void)globalsViewControllerDidFinish:(FLEXGlobalsTableViewController *)globalsViewController;
  26. @end