BGBaseAppDelegate.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // BGBaseAppDelegate.h
  3. // CommonLibrary
  4. //
  5. // Created by Alexi on 3/6/14.
  6. // Copyright (c) 2014 CommonLibrary. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface BGBaseAppDelegate : UIResponder<UIApplicationDelegate>
  10. {
  11. @protected
  12. UIBackgroundTaskIdentifier _backgroundTaskIdentifier;
  13. }
  14. @property (strong, nonatomic) UIWindow *window;
  15. + (instancetype)sharedAppDelegate;
  16. - (void)configAppLaunch;
  17. // 进入登录界面
  18. - (void)enterLoginUI;
  19. // 进入主界面逻辑
  20. - (void)enterMainUI;
  21. // 代码中尽量改用以下方式去push/pop/present界面
  22. - (UINavigationController *)navigationViewController;
  23. - (UIViewController *)topViewController;
  24. - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
  25. - (NSArray *)popToViewController:(UIViewController *)viewController;
  26. - (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)title;
  27. //- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)title backAction:(FWVoidBlock)action;
  28. - (UIViewController *)popViewController;
  29. - (NSArray *)popToRootViewController;
  30. - (void)presentViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)())completion;
  31. - (void)dismissViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)())completion;
  32. @end