开发者

Overloading the IPhone "GO" button to perform an action

I am designing an application using html and javascript. I have a login form with a Login button on it. A textfield accepts a username and then pressing the login button, login action takes place. However, what i want to do now is that while using the virtual keypad in IPhone, clicking the GO button must initiate the Login action too. Please let me know the solution for the same.开发者_JAVA百科 Thanks.


Set a delegate object (point to your view controller) for your UITextField and use the method

- (BOOL)textFieldShouldReturn:(UITextField *)textField

-textFieldShouldReturn will be called just before the user the user taps the "Go" or "Return". Remember to return "YES".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜