gpt4 book ai didi

iphone - UIAlertViewStylePlainTextInput 未声明

转载 作者:行者123 更新时间:2023-11-29 04:12:53 34 4
gpt4 key购买 nike

当该属性应该在框架中可用时,我总是将其视为未声明。

UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Email Alert" message:@"Enter your Email Address" delegate:self cancelButtonTitle:@"Hide" otherButtonTitles:nil];
[alert setAlertViewStyle:UIAlertViewStyleSecureTextInput];
[alert show];
[alert release];

最佳答案

我以这种方式使用了 UIAlertViewStylePlainTextInput 。请根据需要修改代码。

                 alertType = @"phoneNumberAlert";
UIAlertView *phoneNumberAlert = [[UIAlertView
alloc]initWithTitle:@"Notice"
message:@"Please enter your Phone Number" delegate:self
cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];
[phoneNumberAlert setAlertViewStyle:UIAlertViewStylePlainTextInput];
UITextField *alertTextField = [phoneNumberAlert textFieldAtIndex:0];
alertTextField.keyboardType = UIKeyboardTypeNumberPad;
[phoneNumberAlert show];
[phoneNumberAlert release];

关于iphone - UIAlertViewStylePlainTextInput 未声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14160531/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com