FWWindowClassWrapper

@interface FWWindowClassWrapper : FWViewClassWrapper

Undocumented

FWNavigation

  • 获取当前主window

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIWindow *mainWindow;
  • 获取当前主场景

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIWindowScene *mainScene;
  • 获取最顶部的视图控制器

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIViewController *topViewController;
  • 获取最顶部的导航栏控制器。如果顶部VC不含导航栏,返回nil

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UINavigationController *topNavigationController;
  • 获取最顶部的显示控制器

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) UIViewController *topPresentedController;
  • 使用最顶部的导航栏控制器打开控制器

    Declaration

    Objective-C

    - (void)pushViewController:(nonnull UIViewController *)viewController
                      animated:(BOOL)animated;
  • 使用最顶部的显示控制器弹出控制器,建议present导航栏控制器(可用来push)

    Declaration

    Objective-C

    - (void)presentViewController:(nonnull UIViewController *)viewController
                         animated:(BOOL)animated
                       completion:(nullable void (^)(void))completion;
  • 使用最顶部的视图控制器打开控制器,自动判断push|present

    Declaration

    Objective-C

    - (void)openViewController:(nonnull UIViewController *)viewController
                      animated:(BOOL)animated;
  • 关闭最顶部的视图控制器,自动判断pop|dismiss,返回是否成功

    Declaration

    Objective-C

    - (BOOL)closeViewControllerAnimated:(BOOL)animated;