Skip to content

Commit

Permalink
pref: 修改注释
Browse files Browse the repository at this point in the history
  • Loading branch information
l1Dan committed Dec 27, 2023
1 parent c208dc7 commit e9b87a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ typedef BOOL (^NXNavigationBackActionHandler) (UINavigationController *, UIViewC

@interface UINavigationItem (NXNavigationExtension)

/// 处理视图控制器转场状态;优先调用 NXNavigationControllerDelegate
/// 处理视图控制器转场状态;优先调用 NXNavigationTransitionDelegate
/// 只有在 `UIViewController` 的 `init` 方法中设置属性才能拿到到完整的 `Push` 状态
@property (nonatomic, copy, nullable) NXNavigationTransitionStateHandler nx_transitionStateHandler;

/// 拦截视图控制器返回操作;优先调用 NXNavigationControllerDelegate
/// 拦截视图控制器返回操作;优先调用 NXNavigationTransitionDelegate
@property (nonatomic, copy, nullable) NXNavigationBackActionHandler nx_backActionHandler;

@end
Expand Down Expand Up @@ -128,15 +128,15 @@ typedef BOOL (^NXNavigationBackActionHandler) (UINavigationController *, UIViewC
animated:(BOOL)animated
completion:(void (^__nullable)(void))completion NS_SWIFT_ASYNC_NAME(nx_pushViewController(_:animated:));

/// 调用此方法可以触发调用 id<NXNavigationControllerDelegate> 代理方法
/// 调用此方法可以触发调用 id<NXNavigationTransitionDelegate> 代理方法
/// 可以统一处理手势滑动返回和自定义返回按钮点击返回的拦截操作
/// 内部最终会调用系统方法:`popViewControllerAnimated:`
/// @param animated 默认 YES
/// @param completion Pop 动画完成时的回调
- (nullable UIViewController *)nx_popViewControllerAnimated:(BOOL)animated
completion:(void (^__nullable)(void))completion NS_SWIFT_NAME(nx_popViewController(animated:completion:));

/// 调用此方法可以触发调用 id<NXNavigationControllerDelegate> 代理方法
/// 调用此方法可以触发调用 id<NXNavigationTransitionDelegate> 代理方法
/// 可以统一处理手势滑动返回和自定义返回按钮点击返回的拦截操作
/// 内部最终会调用系统方法:`popToViewController:animated:`
/// @param viewController 需要 Pop 的视图控制器
Expand All @@ -146,7 +146,7 @@ typedef BOOL (^NXNavigationBackActionHandler) (UINavigationController *, UIViewC
animated:(BOOL)animated
completion:(void (^__nullable)(void))completion NS_SWIFT_NAME(nx_popToViewController(_:animated:completion:));

/// 调用此方法可以触发调用 id<NXNavigationControllerDelegate> 代理方法
/// 调用此方法可以触发调用 id<NXNavigationTransitionDelegate> 代理方法
/// 可以统一处理手势滑动返回和自定义返回按钮点击返回的拦截操作
/// 内部最终会调用系统方法:`popToRootViewControllerAnimated:`
/// @param animated 默认 YES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
/// For SwiftUI,拿到当前的 NXNavigationVirtualWrapperView
@property (nonatomic, weak, nullable) __kindof NXNavigationVirtualWrapperView *nx_navigationVirtualWrapperView API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));

/// 获取当前视图控制器转场周期事件
/// 获取当前视图控制器转场状态
@property (nonatomic, assign, readonly) NXNavigationTransitionState nx_navigationTransitionState;

/// 获取当前控制器的 NXNavigationBar
Expand Down
8 changes: 4 additions & 4 deletions NXNavigationExtension/Private/NXNavigationExtensionInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ typedef void (^UIViewControllerDidUpdateFrameHandler)(UIViewController *viewCont
- (void)nx_adjustmentSystemBackButtonForViewController:(__kindof UIViewController *)currentViewController
inViewControllers:(NSArray<__kindof UIViewController *> *)previousViewControllers;

/// 准备 Pop 视图控制器的最后检查。主要检查代理 `nx_navigationInteractDelegate` 和视图控制器是否有实现 `id<NXNavigationControllerDelegate>` 代理逻辑。
/// 准备 Pop 视图控制器的最后检查。主要检查代理 `nx_navigationTransitionDelegate` 和视图控制器是否有实现 `id<NXNavigationTransitionDelegate>` 代理逻辑。
/// @param currentViewController 当前所处的视图控制器
/// @param destinationViewController 需要 Pop 到的目标视图控制器
/// @param action 当前 Pop 视图控制器的的交互类型
- (BOOL)nx_viewController:(__kindof UIViewController *)currentViewController
preparePopViewController:(__kindof UIViewController *)destinationViewController
navigationBackAction:(NXNavigationBackAction)action;

/// 处理即将显示的视图控制器的转场周期事件
/// 处理即将显示的视图控制器的转场状态
/// @param appearingViewController 即将显示的视图控制器
/// @param state 当前视图控制器的转场周期事件
/// @param state 当前视图控制器的转场状态
- (void)nx_transitionViewController:(__kindof UIViewController *)appearingViewController
navigationTransitionState:(NXNavigationTransitionState)state;

Expand All @@ -166,7 +166,7 @@ typedef void (^UIViewControllerDidUpdateFrameHandler)(UIViewController *viewCont

@interface UIViewController (NXNavigationExtensionInternal)

/// 获取当前视图控制器转场周期事件
/// 获取当前视图控制器转场状态
@property (nonatomic, assign) NXNavigationTransitionState nx_navigationTransitionState;

/// 记录是否为 childViewControllers 中的控制器,并且当前控制器不是 UINavigationController 的情况下。
Expand Down

0 comments on commit e9b87a9

Please sign in to comment.