ofxiOSKeyboard always at the top of the screen

I would like to place a ofxiOSKeyboard object in a particular position on the screen.
For that I am passing the (x,y,w,h) arguments to the constructor, but the y position parameter is irrelevant for the constructor and the object is always at the top of the screen. All the others arguments work ok.
Has anyone found this problem? Can someone tell me if it is possible to position the object in any “y” position?

Thanks in advance

i have been able to, i think it works on points or something strange as it’s an apple UIKit thang, it took a while for me to position it by eye. One thing to watch out for is setting the height too high as the text doesn’t automatically resize to fill the text box. If you get it to be too short for the text and then play with the position from there

I have struggled the past few hours with this too.
It turns out to be a bug in the ofxiOSKeyboard.mm objective c function -(void) init:
(between lines 191-240).

223 case OF_ORIENTATION_DEFAULT:
224 _x = _xOriginal;
225 _y = _h;
226 break;

line 225 should actually be: _y = yOriginal;

It might be too late for you, but hope it’ll save others some time.

2 Likes