ios9 UIAlertController uitextfield 太小
<p><p>我正在使用此代码显示 UIAlert,它将要求简单的输入</p>
<pre><code>UIAlertController *alert = ;
];
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"Enter text:";
}];
;
</code></pre>
<p>也试过iOS 7的这段代码</p>
<pre><code>UIAlertView *alertViewCustomQuestion=[initWithTitle:@"Custom Question" message:@"Please enter your custom question!" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok",nil];
alertViewCustomQuestion.alertViewStyle=UIAlertViewStylePlainTextInput;
;
</code></pre>
<p>两者都显示相同的结果。虽然我看到的任何例子都有很好的宽度。 <a href="/image/jabnR.png" rel="noreferrer noopener nofollow"><img src="/image/jabnR.png" alt="enter image description here"/></a> </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我正在修复别人的代码的错误,最后发现有一些类别正在改变它的行为。</p></p>
<p style="font-size: 20px;">关于ios9 UIAlertController uitextfield 太小,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/37770180/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/37770180/
</a>
</p>
页:
[1]