?UINavigationController以栈的形式保存子控制器
@property(nonatomic,copy) NSArray *viewControllers;
@property(nonatomic,readonly) NSArray *childViewControllers;
?使用push方法能将某个控制器压入栈
- (void)pushViewController:(UIViewController *)viewController
animated:(BOOL)animated;
?使用pop方法可以移除控制器
?将栈顶的控制器移除
- (UIViewController *)popViewControllerAnimated:(BOOL)animated;
?回到指定的子控制器
- (NSArray *)popToViewController:(UIViewController *)viewController
animated:(BOOL)animated;
?回到根控制器(栈底控制器)
- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated;
时间: 2024-10-05 04:31:51