@interface ViewController : UIViewController
@property (strong,nonatomic) UILabel *aLable;
@property (strong,nonatomic) UILabel *lblPassword;
@end
#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.aLable=[[UILabel alloc]initWithFrame:CGRectMake(, , , )];
self.aLable.text=@"今天天气真的好,中午吃火锅";
//字体颜色及背景
self.aLable.backgroundColor=[UIColor colorWithRed:0.909 green:0.161 blue:0.073 alpha:1.000];
self.aLable.textColor=[UIColor colorWithRed:0.978 green:0.991 blue:1.000 alpha:1.000];
//字体及字号
NSArray *arr=[UIFont familyNames];
NSLog(@"%@",arr); self.aLable.font=[UIFont fontWithName:@"Bodoni 72 Oldstyle" size:];
self.aLable.font=[UIFont systemFontOfSize: weight:];
//阴影颜色及偏移
// self.aLable.shadowColor=[UIColor colorWithRed:0.893 green:0.977 blue:0.942 alpha:1.000];
// self.aLable.shadowOffset=CGSizeMake(10, -10);
//文本对齐
self.aLable.textAlignment=NSTextAlignmentRight;
//字体省略 xxx...,...xxx,xxx...xxx
self.aLable.lineBreakMode=NSLineBreakByTruncatingMiddle;
//标签的行数
// self.aLable.numberOfLines=10;
//文字自适应大小显示在Lable中
// self.aLable.adjustsFontSizeToFitWidth=YES; [self.view addSubview:self.aLable]; self.lblPassword=[[UILabel alloc]initWithFrame:CGRectMake(, , , )];
self.lblPassword.text=@"密码";
self.lblPassword.textColor=[UIColor colorWithRed:1.000 green:0.979 blue:0.962 alpha:1.000];
[self.view addSubview:self.lblPassword]; } - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

iOS UI 之UILable的更多相关文章

  1. [IOS]IOS UI指南

    [IOS]IOS UI指南 众所周知,IOS的界面设计,越来越流行,可以说都形成了一个标准,搜集了一些资料,供自己以后学习使用! iOS Human Interface Guidelines (中文翻 ...

  2. IOS UI 第八篇:基本UI

    实现图片的滚动,并且自动停止在每张图片上     - (void)viewDidLoad{    [super viewDidLoad]; UIScrollView *scrollView = [[U ...

  3. 国外IOS UI指南

    国外IOS UI指南 众所周知,IOS的界面设计,越来越流行,可以说都形成了一个标准,搜集了一些资料,供自己以后学习使用! iOS Human Interface Guidelines (中文翻译) ...

  4. iOS UI的几种模式

    iOS UI的几种模式: 1.平凡模式(原生控件组合): 2.新闻模式: 3.播放器模式: 4.微博模式:

  5. 通过实现一个TableView来理解iOS UI编程

    推荐一篇神作: 通过实现一个TableView来理解iOS UI编程 http://blog.jobbole.com/61101/

  6. iOS UI基础-17.0 UILable之NSMutableAttributedString

    在iOS开发中,常常会有一段文字显示不同的颜色和字体,或者给某几个文字加删除线或下划线的需求.之前在网上找了一些资料,有的是重绘UILabel的textLayer,有的是用html5实现的,都比较麻烦 ...

  7. [iOS UI设计笔记整理汇总]

    8.UIsearchbar放到Navigationbar 上(意思是建个View作为titleview) //此处调用的是第三方封装的SearchBar,也可以自定义. self.searchBarW ...

  8. iOS UI高级之网络编程(HTTP协议)

    HTTP协议的概念 HTTP协议,Hyper Text Transfer Protocol (超文本传输协议)是用于从万维网服务器传送超文本到本地浏览器的传输协议,HTTP是一个应用层协议,由请求和响 ...

  9. iOS - UI - UIWebView

    1.UIWebView UIWebView 是 苹果提供的用来展示网页的UI控件.它也是最占内存的控件. iOS8.0 webkit框架. WKWebView,相比UIWebView,节省了1/3~1 ...

随机推荐

  1. spring 配置多个数据源的文件

    <?xml version="1.0" encoding="UTF-8"?><!-- Repository and Service layer ...

  2. Android学习笔记(第一篇)编写第一个程序Hello World+Activity

    PS:终于开始正式的搞Android了...无人带的一介菜鸟,我还是自己默默的努力吧... 学习内容: 1.编写第一个Hello World程序..   学习Android,那么就需要有一个编译器来集 ...

  3. [New Portal]Windows Azure Virtual Machine (10) 自定义Windows Azure Virtual Machine模板

    <Windows Azure Platform 系列文章目录> 通过之前的文章,我相信大家对微软Windows Azure Virtual Machine有一定的了解了. 虽然微软提供了非 ...

  4. mysqlbinlog -v --base64-output 与不加的区别

    加-v与加-vv的区别: 加--base64-output=DECODE-ROWS与不加的区别:

  5. 点餐系统web版功能需求

                餐厅到店点餐系统需求分析 (版本v1.0.0)               成文信息 主题词: 需求分析 作  者: 14商软ETC 文档类别: 审  核: 批  准: 文档性 ...

  6. ADO.NET ExcuteReader复习

    private void Button_Click(object sender, RoutedEventArgs e) { //ADO.NET 连接方式查询数据库 ExcuteReader执行查询 / ...

  7. ASP.NET中使用DropDownList实现无刷新二级联动详细过程

    Demo.sql create table Car( [id] int identity, ) not null, ) not null ) go insert into Car ([brand],[ ...

  8. 以对象的方式来访问xml数据表(二)

    为什么要以对象的方式来访问xml数据表? 还记得,自己是在一次完成师兄布置的任务时接触到了xml,那时候需要用xml来作为数据文件,保存一个简单的图书管理系统的数据.于是就知道了,可以用xml文件来保 ...

  9. 【C#进阶系列】07 常量和字段

    常量 常量总是被视为静态成员. 常量其实可以不限于基元类型,但是必须初始化为null.(我觉得这个点知道和不知道都一样,我已经自动从脑海中忽略了.很多时候在我这个人眼中,艰涩的代码和垃圾代码,其实没有 ...

  10. sqldbhelper

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data. ...