ios UIAlertView 自带的UITextField为什么这么窄?

如题,哪位知道请帮忙解惑,急!急!急!图片说明

附上源码

  • (void)buidl
    {
    UIAlertView *customAlertView = [[[UIAlertView alloc] initWithTitle:@"自定义服务器地址" message:nil delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil] autorelease];
    [customAlertView setAlertViewStyle:UIAlertViewStyleLoginAndPasswordInput];

    UITextField *nameField = [customAlertView textFieldAtIndex:0];
    nameField.placeholder = @"请输入一个名称";

    UITextField *urlField = [customAlertView textFieldAtIndex:1];
    [urlField setSecureTextEntry:NO];
    urlField.placeholder = @"请输入一个URL";
    urlField.text = @"http://";

    [customAlertView show];
    }

既然是custom,textfield的大小要定义啊。你可以用自带的

图片说明

我运行了一下 ,没有问题 ,我觉得应该是你Xcode的问题,我的Xcode是7.1的

你设置一下大小啊,大哥