UIAleartView 改变输入框的样式
来源:互联网 发布:平安证券行情交易软件 编辑:程序博客网 时间:2024/05/02 03:37
UIAleartView 自带的几种格式
typedef NS_ENUM(NSInteger, UIAlertViewStyle) {
UIAlertViewStyleDefault = 0, 默认样式
UIAlertViewStyleSecureTextInput, 密码输入
UIAlertViewStylePlainTextInput, 文本输入
UIAlertViewStyleLoginAndPasswordInput 文本和密码输入
};
改变输入框的样式
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"tishi" message:@"this is" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"queding", nil];
alert.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput;
UITextField *textfield = [alert textFieldAtIndex:0];
textfield.placeholder = @"diyige";
textfield.secureTextEntry = NO;
UITextField *text2 = [alert textFieldAtIndex:1];
text2.placeholder = @"dierge";
text2.secureTextEntry = NO;
[alert show];
alertview自动关闭
- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //alert UIAlertView *alert=[[UIAlertView alloc]initWithTitle:nil message:@"一个可以自动关闭的Alert窗口" delegate:self cancelButtonTitle:nil otherButtonTitles:nil, nil]; [alert show]; //显示框 UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; indicator.backgroundColor=[UIColor redColor]; indicator.center = CGPointMake(alert.bounds.size.width/2, alert.bounds.size.height-40.0); [indicator startAnimating]; [alert insertSubview:indicator atIndex:0]; //定时器 [NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(dismissAlert:) userInfo:[NSDictionary dictionaryWithObjectsAndKeys:alert, @"alert", @"testing ", @"key" ,nil] repeats:NO];}//alert 自动消失-(void) dismissAlert:(NSTimer *)timer{ UIAlertView *alert = [[timer userInfo] objectForKey:@"alert"]; [alert dismissWithClickedButtonIndex:0 animated:YES]; }
- UIAleartView 改变输入框的样式
- 输入框改变样式
- 改变输入框默认样式
- AngularJS—通过输入的值来改变样式
- 客户端登录界面,根据输入框的弹出改变界面样式,解决键盘挡住输入框的问题
- chrome浏览器自动填充表单导致输入框样式改变
- iOS自定义弹出框(UIAleartView)
- 下划线样式的输入框
- 改变datagrid的样式
- 改变 file 的 样式
- 改变file的样式
- 改变网站的样式
- 改变Alert的样式
- 改变title的样式
- 改变actionbar的样式
- 改变链接的样式
- 改变Dialog的样式
- DatePickerDialog的样式改变
- register_chrdev & unregister_chrdev
- 验证日期格式函数
- spice 协议相关分析总结
- C# SendKeys.SendWait 方法和SendKeys.Send 方法区别
- 文件上传
- UIAleartView 改变输入框的样式
- 【设计模式篇】Android设计模式之-观察者模式 自我见解
- Codeforces Round #279 (Div. 2) F
- 查看csdn的收藏
- iOS基础5:常见呈现模式
- 找源码
- 博客里程碑
- 实现lua和c/c++互调
- npm常用命令