如何在monotouch/Xamarin.Ios的键盘上方添加子视图? [英] How to add subview above the keyboard in monotouch/Xamarin.Ios?
本文介绍了如何在monotouch/Xamarin.Ios的键盘上方添加子视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在monotouch/Xamarin.Ios的键盘顶部添加UIView?
How can i add a UIView on top of the keyboard in monotouch/Xamarin.Ios?
我尝试了以下操作,但似乎不起作用.
i have tried the following but it doesn't seem to work.
UIApplication.SharedApplication.Delegate.Window.AddSubview (myView);
UIApplication.SharedApplication.Delegate.Window.BringSubviewToFront (myView);
UIView被添加在键盘后面.
The UIView is added behind the keyboard.
在Objective c中,我能够使用以下代码,并且可以正常工作.
In Objective c i was able to use the following code and it worked.
[[[[UIApplication sharedApplication] windows] objectAtIndex:1] addSubview:myView];
谢谢.
推荐答案
这对我有用.
UIApplication.SharedApplication.Windows[1].AddSubview(myView);
这篇关于如何在monotouch/Xamarin.Ios的键盘上方添加子视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文