UITextField文字垂直居中和placeholder偏上的问题
2015-11-04 16:07
585 查看
一,UITextField文字垂直居中
searchText.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter;
二,placeholder偏上的问题
[searchText setValue:[UIColor
whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
[searchText setValue:[UIFont
systemFontOfSize:14]
forKeyPath:@"_placeholderLabel.font"];
searchText.font = [UIFont
systemFontOfSize:14];
searchText.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter;
二,placeholder偏上的问题
[searchText setValue:[UIColor
whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
[searchText setValue:[UIFont
systemFontOfSize:14]
forKeyPath:@"_placeholderLabel.font"];
searchText.font = [UIFont
systemFontOfSize:14];
相关文章推荐
- hdu 5531 Rebuild(三分)
- History of UNIX Project Build Tools
- iOS—UI——CALayer
- 接口测试SoapUI参数化
- light oj 1100 - Again Array Queries(暴力,鸽巢原理)
- [leetcode] 63. Unique Paths II 解题报告
- getSession().createQuery("from Users");与getHibernateTemplate().find( "FROM Users);
- UIView —— 所有控件的载体
- [leetcode] 62. Unique Paths 解题报告
- (八)jms topic与jms queue区别
- android build Communication error with Jack server (52)
- Android目录介绍&UI简介
- NSFetchRequest CoreData条件搜索
- [扩展]EasyUI给dialog的buttons绑定click事件
- theano, scan关于 theano.scan函数一些简单的应用只包括fn ,sequences 和outputs_info
- easyui tab
- iOS之获取UITableViewCell中UITextField的值方法总结
- UICollectionView(相册大图查看)
- Error: Program "C:\android\android-ndk-r10\ndk-build.cmd" not found in PATH
- UILabel (API+自定义多颜色文本内容)