更新UIAlertView现在有一个样式,允许在UIAlertViewie中的文本输入字段
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
Run Code Online (Sandbox Code Playgroud)
这很好但我想用一个像"sample"这样的defualt文本初始化输入文本.
我看到过去的人们都使用过无证的api(效果很好)
[alert addTextFieldWithValue:@"sample text" label:@"Text Field"];
Run Code Online (Sandbox Code Playgroud)
但由于这仍然不是官方的Apple公共API,我无法使用它.
还有其他办法吗?我确实尝试初始化,willPresentAlertView但文本字段似乎是只读的.
谢谢