c# - How to add subview above the keyboard in monotouch/Xamarin.Ios? -
how can add uiview on top of keyboard in monotouch/xamarin.ios?
i have tried following doesn't seem work.
uiapplication.sharedapplication.delegate.window.addsubview (myview); uiapplication.sharedapplication.delegate.window.bringsubviewtofront (myview);
the uiview added behind keyboard.
in objective c able use following code , worked.
[[[[uiapplication sharedapplication] windows] objectatindex:1] addsubview:myview];
thank you.
you'll first need create new uiwindow @ same level status bar. can put code in viewdidload override:
newwindow = new uiwindow (uiscreen.mainscreen.bounds); newwindow.windowlevel = uiwindow.levelstatusbar;
and add view (in case button) new uiwindow:
var uibutton = new uibutton (uibuttontype.infodark) { frame = new rectanglef (10, 400, 30, 30) }; newwindow.addsubview (uibutton);
in uitextfield, add event listener editingdidbegin
myinput.editingdidbegin += (object sender, eventargs e) => { newwindow.hidden = false; };
Comments
Post a Comment