摘要: 点击textfield,会自动弹出键盘 要让键盘收回来,先设置个代理:[field setTextFieldDelegate:self]; 可设置成自己,也可设置成其他对象,只要在对应的类中,遵循UITextFieldDelegate协议 在UITextFieldDelegate协议中,有一些可选的 阅读全文
posted @ 2015-12-26 18:03 侯文超 阅读(272) 评论(0) 推荐(0)
摘要: 1.背景颜色 field.backgoundColor = [UIColor redColor]; 2.设置field文字 field.text = @"输入文字"; 3.设置field的提示文字 field.placeholder = @"请输入用户名"; 4.设置field开始编辑时清除提示内容 阅读全文
posted @ 2015-12-26 16:32 侯文超 阅读(454) 评论(0) 推荐(0)
摘要: 1.背景颜色 btn.backgroundColor = [UIColor redColor]; 2.给按钮添加文字并添加显示状态 [btn setTitle@"播放" forState:UIControlStateNormal]; 3.设置文字的颜色并添加显示状态 [btn setTitleCol 阅读全文
posted @ 2015-12-26 16:14 侯文超 阅读(193) 评论(0) 推荐(0)
摘要: .设置字体样式(加粗) label.font = [UIFont boldSystemFontOfSize:30]; 6.设置字体类型 label.font = [UIFont fontWithName:@"Heiti SC" size:18]; 9.设置文字阴影效果 label.shadowCol 阅读全文
posted @ 2015-12-26 15:55 侯文超 阅读(143) 评论(0) 推荐(0)