大佬,看看这个问题怎么办
imphila opened this issue · comments
let url = "abc://bvc/a?apple=1"
let b = ZIKViewRouter<UIViewController, ZIKViewRouteConfiguration>.router(forURL: url)
b?.perform(ZIKViewRoutePath.push(from: self), configuring: { (config) in
config.containerWrapper = { vc in
vc.modalPresentationStyle = .overFullScreen
return vc
}
})
Read the documentation of containerWrapper
. You should wrap the vc in a container (UINavigationController, UITabBarController or UISplitViewController), and return the container.
If you only need to change vc.modalPresentationStyle
, you should do it in prepareDestination
.
let router = ZIKAnyViewRouter.router(forURL: "abc://bvc/a?apple=1")
router?.perform(.push(from: self), configuring: { (config) in
config.prepareDestination = { [weak self] destination in
if let destination = destination as? UIViewController {
destination.modalPresentationStyle = .fullScreen
}
}
})
Get it. Thank you