JXNavigation.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // JXNavigation.h
  3. // shiku_im
  4. //
  5. // Created by p on 2017/12/1.
  6. // Copyright © 2017年 Reese. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. //@interface JXNavigation : NSObject
  10. @interface JXNavigation : UIView
  11. // 页面进出总栈
  12. @property (nonatomic, strong) NSMutableArray *subViews;
  13. // 当前页面控制器的上一个控制器
  14. @property (nonatomic, strong) UIViewController *lastVC;
  15. // 根视图
  16. @property (nonatomic, strong) UIViewController *rootViewController;
  17. // window上的第一层总view,页面都将加在navigationView上,
  18. // 其他如loading符类似需显示在上方的view可以加在window上面,
  19. // 这样可以不受页面进出动画影响
  20. @property (nonatomic, strong) UIView *navigationView;
  21. +(JXNavigation*)sharedInstance;
  22. - (instancetype)init;
  23. - (void)applicationWillResignActive;
  24. // 边缘手势
  25. - (void)screenEdgePanGestureRecognizer:(UIViewController *)viewController;
  26. // 入栈
  27. - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
  28. // 出栈
  29. - (void)dismissViewController:(UIViewController *)viewController animated:(BOOL)animated;
  30. // 跳转根视图
  31. - (void)popToRootViewController;
  32. // 指定的单个控制器回跳(只能跳转subViews中的VC)
  33. - (void)popToViewController:(Class)viewController animated:(BOOL)animated;
  34. // 重置frame
  35. - (void)resetVCFrame;
  36. @end