UITextField 用法简介
来源:互联网 发布:windows程序设计 pdf 编辑:程序博客网 时间:2024/06/05 12:43
UIImageView *myView2 = [[ UIImageView
UITextField*myTextField=[[UITextField alloc]initWithFrame:CGRectMake(40, 40,240, 60)];
myTextField.textColor=[UIColorredColor];
myTextField.delegate=self;//UITextField代理方法设置
myTextField.placeholder=@"输入密码";//UITextField的初始隐藏文字,当然这个文字的字体大小颜色都可以改,重写uitextfield,下次介绍
myTextField.textAlignment=UITextAlignmentCenter;//UITextField的文字对齐格式
myTextField.font=[UIFontfontWithName:@"Times New Roman" size:30];//UITextField的文字大小和字体
myTextField.adjustsFontSizeToFitWidt
myTextField.clearsOnBeginEditing=NO;//UITextField的是否出现一件清除按钮
myTextField.borderStyle=UITextBorderStyleNone;//UITextField的边框
myTextField.background=[UIImageimageNamed:@"my.png"];//UITextField的背景,注意只有UITextBorderStyleNone的时候改属性有效
myTextField.clearButtonMode=UITextFieldViewModeNever
myTextField.leftView=myView;//UITextField的左边view
myTextField.leftViewMode=UITextFieldViewModeAlway
myTextField.rightView=myView2;//UITextField的有边view
myTextField.rightViewMode=UITextFieldViewModeAlway
myTextField.contentVerticalAlignment
[myViewrelease];
[myView2
[self.viewaddSubview:myTextField];
当然myTextField的键盘的出现也隐藏也可以设置:
显示keyboard:
隐藏keyboard
myTextField.contentVerticalAlignment
typedef enum {
}UIControlContentVertical
- UITextField 用法简介
- UITextField 用法简介
- UITextField简介
- uitextfield用法
- UITextField 用法
- UITextField 用法
- UITextField用法
- UITextField使用简介
- UITextField的一些用法
- UIlable UITextField的用法
- UITextField的UIControl用法
- UIControl UITextField用法
- UITextField用法小结
- UITextField的基本用法
- UITextField的用法
- ios-----UITextField的用法
- UITextField属性和用法
- UITextField的用法
- 1.--projecthelp -p src\com\ankangqiao\Hello.java
- Redis运维之道(视频+PPT)
- JDK、J2EE、J2SE、J2ME概念详解
- mapreduce中Cannot load JDBC driver class 'net.sourceforge.jtds.jdbc.Driver' 异常分析
- 2.-projecthelp -p build.xml
- UITextField 用法简介
- timepicker的学习<后面日期大于前面日期>:http://trentrichardson.com/examples/timepicker/
- redis数据持久化
- 浅谈Android开机启动速度优化(含应用程序启动速度优化)
- fix ffmpeg build problem
- M文件无法关联的解决方案
- 解决CE6和CE5在Platform Builder的Connectivity Options上的冲突
- C# 快捷键 打开窗口
- javascript 获取当前网页路径