如何自定义UIAlertView?Apple会批准吗?

Ahm*_*ali 6 iphone cocoa-touch uialertview appstore-approval

我使用的是自定义的UIAlertViewUITextField以获取用户密码.

我被告知这个自定义视图可能会导致我的应用程序被Apple拒绝; 那是对的吗?如果是这样,我的自定义控件的替代品是什么?

saa*_*nib 11

您可以在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];
Run Code Online (Sandbox Code Playgroud)

  • 不要担心我在应用商店中有一些带有此代码的应用. (3认同)