iphone - How to add new UITextField to a custom UITableViewCell when return key pressed with animation -


for example in iphone contacts application,in add address cell, when user typing in "street" text field , text field place holder "street" add below current text field animation, how this?

add code:

- (bool) textfieldshouldreturn:(uitextfield *)textfield{     cgrect frame = textfield.frame;     frame.origin.y = frame.origin.y + frame.size.height + 5;//5 space between 2 teftfields     uitextfield *newtextfield =[[uitextfield alloc] initwithframe:frame];     textfield.placeholder = @"street";     [[textfield superview] addsubview:newtextfield];      return yes; } 

for animation thinggy try tweaking around:

[uiview animatewithduration:(nstimeinterval)                  animations:^{                                        } completion:^(bool finished) {                                        }]; 

cheers.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -