We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有时候想pop到从RootVC开始数的第二个VC怎么办?虽然实现并不复杂,但是这些可自动化的工作能封装起来用着自然舒服很多。 于是我封装了两个更灵活的pop方法:
/** pop到指定viewController @param index 从rootVC开始向后数的index,rootVC为0 */ - (void)ax_popToViewControllerWithIndexFromRoot:(NSUInteger)index; /** pop到指定viewController @param index 从当前viewController开始向前数的index,当前VC为0 */ - (void)ax_popToViewControllerWithIndexFromSelf:(NSUInteger)index;
使用示例: 我在一个view里放置了两列按钮,一列是从RootVC开始数index,另一列是反向从当前VC开始数index。
- (IBAction)popFromRoot:(UIButton *)sender { [self.controller.navigationController ax_popToViewControllerWithIndexFromRoot:sender.titleLabel.text.integerValue]; // 传入参数为几,就pop到从rootVC开始向下数的第几层VC。 } - (IBAction)popFromSelf:(UIButton *)sender { [self.controller.navigationController ax_popToViewControllerWithIndexFromSelf:sender.titleLabel.text.integerValue]; // 传入参数为几,就向前pop几层。 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
有时候想pop到从RootVC开始数的第二个VC怎么办?虽然实现并不复杂,但是这些可自动化的工作能封装起来用着自然舒服很多。
于是我封装了两个更灵活的pop方法:
使用示例:
我在一个view里放置了两列按钮,一列是从RootVC开始数index,另一列是反向从当前VC开始数index。
The text was updated successfully, but these errors were encountered: