边框(UIbutton UItextfiled)
来源:互联网 发布:语音聊天赚钱软件 编辑:程序博客网 时间:2024/06/05 01:10
UIButton *back = [UIButton buttonWithType:UIButtonTypeCustom];
back.frame = CGRectMake(login.frame.origin.x + login.frame.size.width + 59 * ScreenWidth, login.frame.origin.y, 115 * ScreenWidth, 30 * ScreenHeigth);
[back setTitle:@”返回首页” forState:UIControlStateNormal];
[back setTitleColor: [UIColor colorWithRed:37 / 255.0 green:37 / 255.0 blue:37 / 255.0 alpha:1.0] forState:UIControlStateNormal];
back.layer.cornerRadius = 2 * ScreenWidth;
back.layer.masksToBounds = YES;
back.font = [UIFont systemFontOfSize:15.0 * ScreenWidth];
//设置边框宽度和颜色
back.layer.borderColor = [UIColor colorWithRed:50 / 255.0 green:50 / 255.0 blue:50 / 255.0 alpha:1.0].CGColor;
[back.layer setBorderWidth:0.5 * ScreenWidth];
back.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
back.backgroundColor = [UIColor whiteColor];
[back addTarget:self action:@selector(backClicked:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:back];
self.text = [[UITextField alloc] initWithFrame:CGRectMake(20 * ScreenWidth, 40 * ScreenHeigth, [UIScreen mainScreen].bounds.size.width - 40 * ScreenWidth, 45 * ScreenHeigth)];
self.text.delegate = self;
self.text.textColor = [UIColor colorWithRed:100 / 255.0 green:100 / 255.0 blue:100 / 255.0 alpha:1.0];
self.text.backgroundColor = [UIColor colorWithRed:255 / 255.0 green:255 / 255.0 blue:255 / 255.0 alpha:1.0];
self.text.keyboardType = UIKeyboardTypePhonePad;
self.text.placeholder = @”手机号码”;
//设置圆角self.text.layer.cornerRadius = 5 * ScreenWidth;self.text.layer.borderWidth = 1 * ScreenWidth;self.text.layer.borderColor = [[UIColor colorWithRed:200 / 255.0 green:200 / 255.0 blue:200 / 255.0 alpha:1.0] CGColor];[self.view addSubview:self.text];//设置字体距离左边框的距离self.text.leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 70 * ScreenWidth, 0)];self.text.leftViewMode = UITextFieldViewModeAlways;
- 边框(UIbutton UItextfiled)
- OC UILable UITextFiled UIButton
- swift UITextFiled边框设置
- UI基础之----UITextFiled,UIButton,UILable
- UIView UILabel UITextFiled UIButton UIControlView UIAlertView
- uibutton设置边框
- UIButton加彩色边框
- UITextFiled
- 04-常用UI控件之 UIlable UIButton UITextFiled
- UIButton中内容大小,以及UITextFiled改变和选中
- iOS小技巧-UITextFiled/UITextView设置系统圆角边框
- IOS 圆形头像 UIButton边框 按钮边框
- 使用CALayer自定义UIButton边框
- 使用CALayer自定义UIButton边框
- [IOS]UIButton&UIImageView导圆角设边框
- 使用CALayer自定义UIButton边框
- UIButton的边框颜色设置
- 为UIButton设置边框等属性
- linux文件结构
- VB 读取INI文件
- 稀疏矩阵
- 理解Fragment的生命周期
- 欢迎使用CSDN-markdown编辑器
- 边框(UIbutton UItextfiled)
- 图片内存优化
- Show()和ShowDialog()
- 06.Spring 资源加载 - ResourceLoader
- 17. Letter Combinations of a Phone Number
- 横竖屏切换时如何在代码中动态修改位置属性.txt
- Animating Water Using Flow Maps
- iOS10适配总结2
- day18异常2