一、混淆属性 placeholder & text
UITextField *tx = [[UITextField alloc] init];
tx.frame = CGRectMake(100, 100, 100, 100);
tx.backgroundColor = [UIColor yellowColor];
tx.placeholder = @"111";
[self.view addSubview:tx];
UITextField *tx = [[UITextField alloc] init];
tx.frame = CGRectMake(100, 100, 100, 100);
tx.backgroundColor = [UIColor yellowColor];
tx.text = @"111";
[self.view addSubview:tx];
UITextField属性示例
本文通过两个实例展示了UITextField在iOS开发中的使用方式,包括如何设置文本框的位置、大小、背景颜色及占位符等内容。
160

被折叠的 条评论
为什么被折叠?



