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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -