UINavigationController(QMUI)
@interface UINavigationController (QMUI) <UIGestureRecognizerDelegate>
/// 是否在 push 的过程中
@property(nonatomic, readonly) BOOL qmui_isPushing;
/// 是否在 pop 的过程中,包括手势、以及代码触发的 pop
@property(nonatomic, readonly) BOOL qmui_isPopping;
/// 获取顶部的 ViewController,相比于系统的方法,这个方法能获取到 pop 的转场过程中顶部还没有完全消失的 ViewController (请注意:这种情况下,获取到的 topViewController 已经不在栈内)
@property(nullable, nonatomic, readonly) UIViewController *qmui_topViewController;
/// 获取<b>rootViewController</b>
@property(nullable, nonatomic, readonly) UIViewController *qmui_rootViewController;
/// QMUI 会修改 UINavigationController.interactivePopGestureRecognizer.delegate 的值,因此提供一个属性用于获取系统原始的值
@property(nullable, nonatomic, weak, readonly) id<UIGestureRecognizerDelegate> qmui_interactivePopGestureRecognizerDelegate;
- (void)qmui_pushViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
- (UIViewController *)qmui_popViewControllerAnimated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
- (NSArray<UIViewController *> *)qmui_popToViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
- (NSArray<UIViewController *> *)qmui_popToRootViewControllerAnimated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
@end
Undocumented
-
是否在 push 的过程中
Declaration
Objective-C
@property (nonatomic, readonly) BOOL qmui_isPushing;
Swift
var qmui_isPushing: Bool { get }
-
是否在 pop 的过程中,包括手势、以及代码触发的 pop
Declaration
Objective-C
@property (nonatomic, readonly) BOOL qmui_isPopping;
Swift
var qmui_isPopping: Bool { get }
-
获取顶部的 ViewController,相比于系统的方法,这个方法能获取到 pop 的转场过程中顶部还没有完全消失的 ViewController (请注意:这种情况下,获取到的 topViewController 已经不在栈内)
Declaration
Objective-C
@property (nonatomic, readonly, nullable) UIViewController *qmui_topViewController;
Swift
var qmui_topViewController: UIViewController? { get }
-
获取rootViewController
Declaration
Objective-C
@property (nonatomic, readonly, nullable) UIViewController *qmui_rootViewController;
Swift
var qmui_rootViewController: UIViewController? { get }
-
QMUI 会修改 UINavigationController.interactivePopGestureRecognizer.delegate 的值,因此提供一个属性用于获取系统原始的值
Declaration
Objective-C
@property (nonatomic, weak, readonly, nullable) id<UIGestureRecognizerDelegate> qmui_interactivePopGestureRecognizerDelegate;
Swift
weak var qmui_interactivePopGestureRecognizerDelegate: UIGestureRecognizerDelegate? { get }
-
Undocumented
Declaration
Objective-C
- (void)qmui_pushViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
Swift
func qmui_pushViewController(_ viewController: UIViewController, animated: Bool, completion: (() -> Void)? = nil)
-
Undocumented
Declaration
Objective-C
- (UIViewController *)qmui_popViewControllerAnimated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
Swift
func qmui_popViewController(animated: Bool, completion: (() -> Void)? = nil) -> UIViewController
-
Undocumented
Declaration
Objective-C
- (NSArray<UIViewController *> *)qmui_popToViewController:(UIViewController *)viewController animated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
Swift
func qmui_pop(to viewController: UIViewController, animated: Bool, completion: (() -> Void)? = nil) -> [UIViewController]
-
Undocumented
Declaration
Objective-C
- (NSArray<UIViewController *> *)qmui_popToRootViewControllerAnimated:(BOOL)animated completion:(void (^_Nullable)(void))completion;
Swift
func qmui_popToRootViewController(animated: Bool, completion: (() -> Void)? = nil) -> [UIViewController]