开发者

UI picker Trying to do it the right way

I am trying to use a UI picker like a combo box in C#. User clicks on a TextField, I have set the inputView to be the picker. This works fine. User clicks on the row and I get the item on that row and place it in the textfield.

However, when the application loads, this picker is visible! I don't want it to be visible. I want to be able to make it visible when the user clicks on the textbox and then when he or she moved off I want to hide it. How do you do this?

Also , is it possible to have the picker only if the user wants to do a lookup like CTRL click. Otherwise, it uses the keyboard? How do you toggle back and开发者_如何学C forth between the keyboard and the picker.

For example suppose user wants to add a new book. He/she clicks on the authors textfield and he/she either types the author ( a new author that does not exist in the database) or select and existing author from the list.

Thanks


The best way to do this is using the inputView property of the textField. You can just set that to the picker and it should handle the rest for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜