Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rupesh.swami

macrumors newbie
Original poster
Mar 9, 2009
29
0
hi all,
i am newBie to iPhone Programming

I want to whenever user Press return Key in any UITextField then focus transfer to Next UITextField

Also how can i make UITextField to Read Only. so user can not type anything in UITextField
 

sujithkrishnan

macrumors 6502
May 9, 2008
265
0
Bangalore
Focus to nextField

In - (BOOL)textFieldShouldReturn:(UITextField *)textField this method before returning yes,textField on which u want to focus just call becomeFirstResponder
For eample if u have two textfields firstname,lastname if ur in editing mode of firstname when u hit return then just comapre if([textField isEqual:firstname])
if it is true then [lastName becomeFirstResponder].
If u want readOnly then set userInteractionEnabled to NO
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.