iPhone上获取用户输入的方法
我正在开发一个 iPhone 应用程序,希望在用户单击我的自定义搜索按钮时弹出一个简单的文本输入框。我的问题是我不确定有哪些方法可以实现这一目标。谷歌搜索导致搜索过载,我看到了太多的观点,以至于我不确定什么是标准的,什么不是。我向用户请求的信息是一个邮政编码,因此如果可能的话,我希望避免为此创建一个全新的视图。我对 Xcode 工作还是个新手,所以请放轻松。
编辑:iTunes 用来询问您密码的对话框是理想的选择。那叫什么?
I'm working on an iPhone app and would like to have a simple text input box pop up when a user clicks my custom search button. My problem is that I'm not sure what approaches are available for achieving this. Googling results in search overload and I am presented with so many views that I'm not sure what is standard and what isn't. The information I am requesting from the user is a single zip code so I would like to avoid creating a whole new view for this if possible. I am still new to working in Xcode so please take it easy on me.
Edit: The dialog box that iTunes uses to ask for your password would be ideal. What is that called?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,您可以使用包含 UITextView 的 UIAlertView。
老实说,我不确定苹果会喜欢它,因为 UIAlertView 应该只提示消息来通知用户,但它至少有点酷;)
你可以在这个网站上找到一个教程:http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html
Well, you could use a UIAlertView including a UITextView.
Honestly, I'm not sure Apple will like it, because UIAlertView should only prompt message to inform the user, but it's at least kinda cool ;)
You can find a tutorial on this website : http://iphonedevelopment.blogspot.com/2009/02/alert-view-with-prompt.html
使用
或
希望有帮助!祝你好运
Use
or
Hope it helps! Best of luck