© 2013 All rights reserved.
0

UITextFields: event click to "Return key" on keyboard

The keyboard includes a “return key”, which can be linked to any action, such as moving to the next field on the form, this we can do with overload function textFieldShouldReturn.

Often we have a group of text fields and want to be able to switch from one to the next using the keyboard.

 



textFieldShouldReturn

 

1. Create interface in h file

Inteface define properties and must contain UITextFieldDelegate as delegate class.

Set delegate in Xib file

When we created UITextFields in the header file, you can connect with XIB file.

What is important: you need to set element delegate to File’s Owner.

 



textFieldShouldReturn

 

Overload function textFieldShouldReturn

Setting options of “Return key”

 


textFieldShouldReturn

Comments (0)

No comments yet, but you can be the first..

Add comment

About
Hi, i am programmer from the Czech Republic. I love web development (Ruby, Ruby on Rails, PHP, Nette) and iOS development (Objective-C, Cocoa).
To cooperate, here is my phone:
+420 608 836