开发者

i Want two UITextFields but with different delegate methods

I have a view with 2 textfields in it. The first one should get URL's, the second words to be searched on google. The problem is that the following method -(BOOL)textFieldShouldReturn:(UIText开发者_开发百科Field *)textField; designs the behavior for both of them. What should I do in order to be able to design two behaviors just as I mentioned above (URL opening and google searching).


You only have one set of delegate methods, they take as an argument the textfield. Switch on the tag (set each tag to be different numbers than the other). Take appropriate action based on the tag value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜