UILabel,UITextField 以及UIButton应用】的更多相关文章

</pre><pre name="code" class="cpp">一.UILabel 它是ioS开发使用的控件来显示文本,它是UIView子类,所以细节UIView部功能,仅仅只是比UIView多了文字显示的功能, 使用过程也是分四步: 1.创建对象 2.配置属性 3.加入到父视图 4.释放全部权 重点:不同的控件之间仅仅是配置的属性的不同,也就是差异所在,所以学习一个新的控件,仅仅有配置该控件独有的属性就可以 1.创建对象 UILabe…
##DAY2 UILabel.UITextField.UIButton.UIImageView.UISlider #pragma mark ———————UILabel——————————— UILabel属性: text:文本内容 textColor:内容的颜色 textAlignment:对齐方式(水平方向) font:字体 numberOfLines:行数 lineBreakMode:断行模式 shadowColor:阴影颜色 shadowOffset:阴影大小(阴影向x正⽅向偏移a,向y…
1.UILabel 1> 概述 UILabel (标签): 是显示文本的控件.在App中 UILabel 是出现频率最高的控件 UILabel 是 UIView 子类,作为子类一般是为了扩充父类的功能, UILabel 扩展了文字显示的功能, UILabel 是能显示文字的视图. 2> 创建UILabel的步骤 创建UILabel与创建UIView的步骤很相似. 开辟空间并初始化(如果本类有初始化方法,则使用自己的初 始化方法;否则使用父类的) 设置文本控制相关的属性 添加到父视图上,用以显示…
工作之余,学习下swift大法.把自己的学习过程分享一下.当中的布局很乱,就表在意这些细节了.直接上代码: UIButton+UILabel // // ViewController.swift // manyControl // // Created by shaoting on 16/3/23. // Copyright © 2016年 9elephas. All rights reserved. // /// swift控件篇 // UIButton // UILabel import U…
(一)UILabel空件 属性: 1.背景颜色 label.backgroundColor = [UIColor ***]; 2. 显示文字: label.text = @"******"; 3.改变文字颜色:label.text  = [UIColor ***]; 4.调整文字字体大小: label.font = [UIFont sysemFontOfSize:20]; 5.文字对齐方式: label.textAlignment = NSTextAlignmentCenter; 6.…
UILabel : UIView <NSCoding> 1.创建一个UILabel对象 UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(30, 30, 280, 60)]; 2.backgroundColor 背景颜色 3.text 显示的文本信息 eg:label.text = @"显示的文本信息"; 4.textColor 文本颜色 eg:label.textColor = [UIColor yello…
1.NSKernAttributeName: @10 调整字句 kerning 字句调整 2.NSFontAttributeName : [UIFont systemFontOfSize:_fontSize] 设置字体 3.NSForegroundColorAttributeName :[UIColor redColor] 设置文字颜色 4.NSParagraphStyleAttributeName : paragraph 设置段落样式 5.NSMutableParagraphStyle *pa…
#import "ViewController.h" #import <CoreText/CoreText.h> @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //学习内容 /* 1.控件 UIView UILabel UITextField UITextView UIButton 2.字体.大小.单位.颜…
Java代码 收藏代码 #import "ViewController.h" #import <CoreText/CoreText.h> @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //学习内容 /* 1.控件 UIView UILabel UITextField UITextView UIButton…
1.UILabel - UILabel的常见属性 @property(nonatomic,copy) NSString *text; 显示的文字 @property(nonatomic,retain) UIFont *font; 字体 UIFont代表字体,常见创建方法有以下几个: + (UIFont *)systemFontOfSize:(CGFloat)fontSize; 系统默认字体 + (UIFont *)boldSystemFontOfSize:(CGFloat)fontSize; 粗…