需要一种将UITextField添加到UIAlertView的新方法 [英] Need new way to add a UITextField to a UIAlertView

查看:42
本文介绍了需要一种将UITextField添加到UIAlertView的新方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的应用程序被拒绝了(每隔一段时间我就将其批准以进行审查,而且我很久没有接触过此代码路径了)或此行:

So my app was rejected (it has been approved every other time i have put it in for review and I hadn't touched this code path in ages) or this line:

[myAlert addTextFieldWithValue:nil label:NSLocalizedString(@"Name",@"Name")];

显然是 addTextFieldWithValue:label:是私有API ...那么我们应该如何将UITextField放在AlertView中?

Apparently addTextFieldWithValue:label: is a private API... so how are we supposed to put a UITextField inside an AlertView?

有人可以帮忙吗?

推荐答案

您没有.警报视图仅用于显示警报.Apple有时会使用它们来显示文本字段,但这是它们的特权(因为他们编写了HI指南以及所有内容).

You don't. Alert views are for displaying alerts only. Apple uses them to display text fields sometimes, but that's their prerogative (since they wrote the HI guidelines and all).

在用户界面中找到另一种方法来提示用户输入数据.这是一个移动平台,而不是台式机.在这样的平台上使用这样的弹出窗口收集信息通常是 .

Find a different approach in your UI for prompting the user for data. This is a mobile platform, not a desktop. Using popups like this for information gathering on such a platform is usually inappropriate.

这篇关于需要一种将UITextField添加到UIAlertView的新方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆