如何自定义UIAlertView?苹果会批准吗? [英] How to customize UIAlertView? Will Apple approve it?

查看:122
本文介绍了如何自定义UIAlertView?苹果会批准吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用自定义 UIAlertView UITextField 从用户获取密码。

I am using a custom UIAlertView with UITextField to get password from the user.

我被告知这个自定义视图可能导致我的应用程序被苹果拒绝;那是对的吗?

I have been told that this custom view may cause my App to get reject by Apple; is that correct? If so, what is the appropriate replacement for my custom control?

推荐答案

您可以在UIAlertView中添加一个文本字段

You can add a textfield to your UIAlertView

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"title" message:@"msg" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
UITextField *txtField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
[alertView addSubview:txtField];
[alertView show];
[alertView release];

这篇关于如何自定义UIAlertView?苹果会批准吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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