开发者

Words Per Minute Iphone SDK

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 t开发者_JS百科o use.

Thanks you.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜