diff --git a/Softeq.XToolkit.WhiteLabel.iOS/ViewControllerBase.cs b/Softeq.XToolkit.WhiteLabel.iOS/ViewControllerBase.cs index 5877e240..08673a14 100644 --- a/Softeq.XToolkit.WhiteLabel.iOS/ViewControllerBase.cs +++ b/Softeq.XToolkit.WhiteLabel.iOS/ViewControllerBase.cs @@ -66,7 +66,7 @@ public override void ViewDidLoad() public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); - ViewModel.OnAppearing(); + NotifyViewModelAboutAppearing(); AttachBindings(); } @@ -74,7 +74,7 @@ public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); DetachBindings(); - ViewModel.OnDisappearing(); + NotifyViewModelAboutDisappearing(); } public override void ViewDidDisappear(bool animated) @@ -84,6 +84,16 @@ public override void ViewDidDisappear(bool animated) CloseDialogIfNeeded(); } + protected virtual void NotifyViewModelAboutAppearing() + { + ViewModel.OnAppearing(); + } + + protected virtual void NotifyViewModelAboutDisappearing() + { + ViewModel.OnDisappearing(); + } + protected virtual void DoAttachBindings() { }