My code have worked find in Xamarin.iOS. But now i apply Xamarin.Forms into my project, it do not work correct.
My code worked fine when i call Page by PushAsync
```Navigation.PushAsync (new MyPage (), true);
My code do not work correct when i call Page by PushModalAsync
```Navigation.PushModelAsync (new MyPage(), true);
Code in KeyboardUtil.cs
```UIView rootView = UIApplication.SharedApplication.KeyWindow.RootViewController.View;
NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, KeyBoardUpNotification);
NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, KeyBoardDownNotification);
And i define function to find Entry (active view, focus view)
```void FindActiveView (UIView parentView)
{
foreach (UIView view in parentView.Subviews) {
if (view.IsFirstResponder) {
activeView = view;
return;
}
if (view.Subviews.Length > 0) {
FindActiveView (view);
}
}
}
I cannot find activeView because my current page is on Modal page, and UIApplication.SharedApplication.KeyWindow.RootViewController.View
do not return View in modal page.
Can you help me, please ? Or give me some advice to find View in Modal Page !