Created attachment 20347 [details]
PageRenderer's Disappear() is not called when ContentPage is in a TabbedPage.
It is not called when I change App.MainPage on forms.
This causes many problems because we do unregister observers in ViewWillDisappear.
If this renderer method's not called, there is no way to unregister observer.
attached sample project reproduces it.
tested XF ver : 2.3.4-pre5
It worked fine on 126.96.36.199.
This works fine for me with your repo.
Can you give me what versions of Xamarin you have?
Created attachment 20357 [details]
Created attachment 20363 [details]
correct sample project
I'm sorry to attach wrong sample project.
The contentpage should be inside Navigation.
1. select second tab named "nav"
2. press the button.
Both ViewWillDisappear and ViewDidDisappear are not called
I attached new sample project again.
Please look this.
Comment on attachment 20347 [details]
This prev project does not reproduce the issue.
Please try my new attachment project.
Hey Bright Lee, can you try override dispose and see if it works for you on the custom renderer ?
The thing is to fix a memory leak we are disposing the custom renderer first and that's why you don't get the override being called. We do RemoveFromSuperView first, but it seems it doesn't call ViewDidDisappear .
If you ask me if I can or not, I'll say yes and no problem.
I checked it and works fine.
But I can not say anything if it's right.
At least I'm afraid this changes will be a problem on other companies' app as well.
Especially if they've been unregistering an observer in OnDisappear().
@Bright Lee: Thank you for your feedback. We agree that this is a behavioral change that may affect other users. We will include a warning note on the 2.3.4 release notes.