Tag:navbarnavigatorobjective-ciosweex
Article From:https://segmentfault.com/q/1010000012144038
Question:

nativePageA –(push)–> weexPageA –(push)–> weexPageB –(push)–> nativePageB –(pop)–> weexPageB
At this time, the original navigation bar will appear on the top of weexPageB.
Remarks:
1、weexPageAIt is the weex entry page, which is the first weex page loaded by IOS native. I processed it in viewWillAppear, as follows
-(void)viewWillAppear:(BOOL)animated{

[super viewWillAppear:animated];
self.navigationController.navigationBarHidden = YES;

}
It means that there is no problem of navigation bar on the weexPageA page. This is what I hope.

2、weexPageBIt’s come from the weexPageA page push and has gone out of the viewWillAppear control (I hit a breakpoint in Xcode, monitoring, when rendering weexPageB, viewWillAppear doesn’t trigger), in natThe native navigation bar will appear at the top of the ivePageB page pop weexPageB.

Answer 0:

At present, there is a way to compare low, that is, in the parent class, when the interface disappears, a hidden navigation bar is handled.
-(void)viewWillDisappear:(BOOL)animated{

[super viewWillDisappear:animated];
if (self.isFromWeex) {
    [self.navigationController setNavigationBarHidden:YES];
}

}
I hope to have good suggestions and continue to put forward, thank you!

Answer 1:

WXNavigationProtocol to achieve their own to write a handler similar to WXNavigationDefaultImpl, interception jump method, jump to a weexVC of their own.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *