UIViewController(FWNavigation)

@interface UIViewController (FWNavigation)

#pragma mark - Navigation

/// 打开控制器。1.如果打开导航栏,则调用present;2.否则如果导航栏存在,则调用push;3.否则调用present
- (void)fw_openViewController:(UIViewController *)viewController animated:(BOOL)animated NS_SWIFT_UNAVAILABLE("");

/// 打开控制器。1.如果打开导航栏,则调用present;2.否则如果导航栏存在,则调用push;3.否则调用present,完成时回调
- (void)fw_openViewController:(UIViewController *)viewController animated:(BOOL)animated options:(FWNavigationOptions)options completion:(nullable void (^)(void))completion NS_REFINED_FOR_SWIFT;

/// 关闭控制器,返回是否成功。1.如果导航栏不存在,则调用dismiss;2.否则如果已是导航栏底部,则调用dismiss;3.否则调用pop
- (BOOL)fw_closeViewControllerAnimated:(BOOL)animated NS_SWIFT_UNAVAILABLE("");

/// 关闭控制器,返回是否成功。1.如果导航栏不存在,则调用dismiss;2.否则如果已是导航栏底部,则调用dismiss;3.否则调用pop,完成时回调
- (BOOL)fw_closeViewControllerAnimated:(BOOL)animated options:(FWNavigationOptions)options completion:(nullable void (^)(void))completion NS_REFINED_FOR_SWIFT;

#pragma mark - Workflow

/** 自定义工作流名称,支持二级("."分隔);默认返回小写类名(去掉ViewController、Controller) */
@property (nonatomic, copy) NSString *fw_workflowName NS_REFINED_FOR_SWIFT;

@end

Undocumented

Navigation

  • 打开控制器。1.如果打开导航栏,则调用present;2.否则如果导航栏存在,则调用push;3.否则调用present

    Declaration

    Objective-C

    - (void)fw_openViewController:(nonnull UIViewController *)viewController
                         animated:(BOOL)animated;
  • 打开控制器。1.如果打开导航栏,则调用present;2.否则如果导航栏存在,则调用push;3.否则调用present,完成时回调

    Declaration

    Objective-C

    - (void)fw_openViewController:(nonnull UIViewController *)viewController
                         animated:(BOOL)animated
                          options:(FWNavigationOptions)options
                       completion:(nullable void (^)(void))completion;
  • 关闭控制器,返回是否成功。1.如果导航栏不存在,则调用dismiss;2.否则如果已是导航栏底部,则调用dismiss;3.否则调用pop

    Declaration

    Objective-C

    - (BOOL)fw_closeViewControllerAnimated:(BOOL)animated;
  • 关闭控制器,返回是否成功。1.如果导航栏不存在,则调用dismiss;2.否则如果已是导航栏底部,则调用dismiss;3.否则调用pop,完成时回调

    Declaration

    Objective-C

    - (BOOL)fw_closeViewControllerAnimated:(BOOL)animated
                                   options:(FWNavigationOptions)options
                                completion:(nullable void (^)(void))completion;

Workflow

  • 自定义工作流名称,支持二级(“."分隔);默认返回小写类名(去掉ViewController、Controller)

    Declaration

    Objective-C

    @property (nonatomic, copy) NS_REFINED_FOR_SWIFT NSString *fw_workflowName;