Bring to front DatePicker on an UITextField

Posted by crazyfr on Stack Overflow See other posts from Stack Overflow or by crazyfr
Published on 2010-06-07T23:40:49Z Indexed on 2010/06/07 23:52 UTC
Read the original article Hit count: 434

Hi,

When an UITextField is firstResponder, I would like to bring to front an UIDatePicker (bottom part of the screen) without the "going down keyboard" (no call to UITextField resignFirstResponder).

The aim is to process like UIKeyboard of UITextField which pop-up on nearly everything when it becomeFirstResponder. modalViewController seems to be fullscreen only.


- showDatePicker:(id)sender {
    if([taskName isFirstResponder]) [taskName resignFirstResponder];
    [self.view.window addSubview: self.pickerView];

    // size up the picker view and compute the start/end frame origin
    (...)
    [UIView commitAnimations];

}

This example is an animation of keyboard going down, and DatePicker going up, behind and not in front.

Do you know a solution ? A piece of code would be welcome. Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about uiview