tags:

views:

31

answers:

1

Hi,

I need to calculate words per minute while typing in textfield. It is typing speed calculator and it provides user text need to be typed in the lable above textfield. Please give me some idea how to get started and what events to use.

Thanks you.

A: 

UITextField lets you set a delegate implementing UITextFieldDelegate. That object will be sent textField:shouldChangeCharactersInRange:replacementString: for each edit the user does (for example entering a char).

In there you can implement your logic - saving the timestamp of the first entry, comparing each entry against the correct string, and then, when the entire string has been entered by the user, dividing the number of words with the spent time.

eliego
yes exactly doing same approach. thank you. I will post code shortly