iPhone SDK - 使用的UITextField为+联系人按钮 [英] iPhone SDK - UITextField with + Button for Contacts
问题描述
在如Mail某些应用中,当你有一个的UITextField,有一个小+按钮的权利。当你点击它,一个模式视图控制器来了,你可以选择一个电话号码,地址等而来,它会出现在文本框中。我想知道如何在自己的应用程序实现这一点。谢谢,
艾萨克
In some applications like Mail, when you have a UITextField, there is a little + button to the right. When you tap it, a modal view controller comes up which you can select a phone number, address, etc from, and it will appear in the text field. I was wondering how to implement this in my own app. Thanks,
Isaac
推荐答案
如果你想文本字段中的加号按钮,来看看的的 rightView
属性UITextField类,它可以让你把所有的UIView在文本字段的最右边的部分。你可以把一个UIButton那里,与创建
If you want the plus button inside the text field, take a look at the rightView
property of the UITextField class, which lets you put any UIView in the right-most portion of the text field. You can put a UIButton there, as created with
[UIButton buttonWithType:UIButtonTypeContactAdd];
这篇关于iPhone SDK - 使用的UITextField为+联系人按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!