Open qiushuitian opened 6 years ago
URLNavigator doesn't support popping view controllers. If it is needed, you can still make an extension.
@devxoul How?
@thepinyo Like this:
extension Navigator {
func pop(animated: Bool = true) {
UIViewController.topMost?.navigationController?.popViewController(animated: animated)
}
}
hello, I implement the push like this in my viewModel:
And In the roomListViewController I want pop to current viewController when I click the back button. But I have to write the code in the viewController (not in the viewModel) use origin pop:
Can I do it using the URLNavigator so that I can write all view navigtion logic in viewModel ?