iphone - how to stretch a UITextField on begin editng -


i want increase size of uitextfield when editing begins, cant code it.

gomathi correct. add answer if want textfield expand when editing begins , shrink again when editing ends , want animate it, might wanna this:

    - (bool)textfieldshouldbeginediting:(uitextfield *)textfield {     [uiview animatewithduration:0.5 animations:^{         textfield.frame = cgrectmake(textfield.frame.origin.x-20, textfield.frame.origin.y, textfield.frame.size.width+40, textfield.frame.size.height);     }];     return yes; }  - (bool)textfieldshouldreturn:(uitextfield *)textfield {     [uiview animatewithduration:0.5 animations:^{         textfield.frame = cgrectmake(textfield.frame.origin.x+20, textfield.frame.origin.y, textfield.frame.size.width-40, textfield.frame.size.height);     }];     [textfield resignfirstresponder];     return yes; } 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -