UILabel *_label = [[UILabel alloc]initWithFrame:CGRectMake(,  self.view.frame.size.height*0.5f, self.view.frame.size.width*0.5f, )];
_label.backgroundColor = [UIColor colorWithRed: green: blue: alpha:0.6];
_label.textColor = [UIColor whiteColor];
_label.layer.cornerRadius = ;
_label.layer.masksToBounds= YES;
_label .font = [UIFont systemFontOfSize:];
_label .numberOfLines = ;
_label .textAlignment = UITextAlignmentCenter;
_label.text = @"轻触";
[self.view addSubview:_label];

UILabel基本用法的更多相关文章

  1. swift - UILabel的用法

    1.label的声明 class FirstyViewController: UIViewController { var label = UILabel()//初始化 override func v ...

  2. UILabel常见用法

    //创建一个UILabel UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(50 , 100 , 200 , 560)]; // ...

  3. iOS开发之三:常用控件--UILabel的使用

    UILabel 一般用来显示文本内容. 常用的属性如下: @property(nonatomic,copy) NSString *text; // 文本的内容,默认为 nil @property(no ...

  4. 【Demo 0006】iOS常用控件

    本章学习要点       1.  了解iOS中控件继承关系:       2.  掌握UIControl基础知识;       3.  掌握UIButton基本用法:       4.  掌握UILa ...

  5. 2015最新iOS学习线路图

    iOS是由苹果公司开发的移动操作系统,以xcode为主要开发工具,具有简单易用的界面.令人惊叹的功能,以及超强的稳定性,已经成为iPhone.iPad 和iPod touch 的强大基础:iOS 内置 ...

  6. UILabel用法

    // UILabel -> UIView // UILabel用来显示文字内容 //创建一个Label,一般都直接通过initWithFrame确定位置跟大小 UILabel *lb = [[U ...

  7. UILabel 的属性(用法)方法

    Label 中常用的方法属性 UILabel *label =[[UILabel alloc]initWithFrame:CGRectMake(90, 100, 140, 40)];//设置Label ...

  8. Swift - 文本标签(UILabel)的用法

    1,标签的创建 1 2 3 4 5 6 7 8 9 10 import UIKit class ViewController: UIViewController {     override func ...

  9. iOS UIlabel怎么加载html字符串 富文本的用法

    要加载html字符串,用人说,直接用webView啊!但是,有时候我们只需要显示2行文字,如此少的内容却要在复杂的UI排版中加入一个占用资源较多的webview,得不偿失.这里要说的是,我们其实可以用 ...

随机推荐

  1. 突破极限 解决大硬盘上安装Unix新思路

    一.问题提出 硬盘越做越大,然我喜欢让我忧.10年前就遇到过在586电脑BIOS不认识超过8.4G容量硬盘的问题,以及Windows Nt操作系统不认大硬盘(容量超过8.4G)的问题,对于Linux ...

  2. nslookup---域名查询

    nslookup命令是常用域名查询工具,就是查DNS信息用的命令. nslookup4有两种工作模式,即“交互模式”和“非交互模式”. 在“交互模式”下,用户可以向域名服务器查询各类主机.域名的信息, ...

  3. VitrualBox虚拟机设置网络桥接方式与windows互相ping通

    一.VitrualBox 选择桥接模式 由于公司服务器对MASK地址访问外网有严格的限制,所以虚拟机里边的HWaddr mask地址没有加入公司的服务器的路由表里边,所以访问不了外网,而网络转换地址( ...

  4. 【UWP通用应用开发】控件、应用栏

    控件的属性.事件与样式资源 怎样加入控件 加入控件的方式有多种,大家更喜欢以下哪一种呢? 1)使用诸如Blend for Visual Studio或Microsoft Visual Studio X ...

  5. js34

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...

  6. [51Nod]NOIP2018提高组省一冲奖班模测训练(一)题解

    http://www.51nod.com/contest/problemList.html#!contestId=72&randomCode=147206 原题水题大赛.. A.珂朵莉的旅行 ...

  7. 在Sql中将 varchar 值 '1,2,3,4,5,6' 转换成数据类型 int

    --问题:将aa转换为Int类型失败 string aa="3,5,11,56,88,45,23"; select * from ERPBuMen where ID in(aa) ...

  8. Dao层封装泛型实现(spring mvc,springjdbctemplate)

    代码片段(6) [全屏查看所有代码] 1. [代码]BaseDao     跳至 [1] [2] [3] [4] [全屏预览] ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 ...

  9. c3p0的经常使用配置方式

    1:第一种方式很easy c3p0.driverClass=com.mysql.jdbc.Driver c3p0.jdbcUrl=jdbc:mysql://localhost:3308/databas ...

  10. 解决浏览器不兼容websocket

    本例使用tomcat 7.0的websocket做为例子. 1.新建web project.2.找到tomcat 7.0 lib 下的 catalina.jar,tomcat-coyote.jar添加 ...