UILabel基本用法
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基本用法的更多相关文章
- swift - UILabel的用法
1.label的声明 class FirstyViewController: UIViewController { var label = UILabel()//初始化 override func v ...
- UILabel常见用法
//创建一个UILabel UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(50 , 100 , 200 , 560)]; // ...
- iOS开发之三:常用控件--UILabel的使用
UILabel 一般用来显示文本内容. 常用的属性如下: @property(nonatomic,copy) NSString *text; // 文本的内容,默认为 nil @property(no ...
- 【Demo 0006】iOS常用控件
本章学习要点 1. 了解iOS中控件继承关系: 2. 掌握UIControl基础知识; 3. 掌握UIButton基本用法: 4. 掌握UILa ...
- 2015最新iOS学习线路图
iOS是由苹果公司开发的移动操作系统,以xcode为主要开发工具,具有简单易用的界面.令人惊叹的功能,以及超强的稳定性,已经成为iPhone.iPad 和iPod touch 的强大基础:iOS 内置 ...
- UILabel用法
// UILabel -> UIView // UILabel用来显示文字内容 //创建一个Label,一般都直接通过initWithFrame确定位置跟大小 UILabel *lb = [[U ...
- UILabel 的属性(用法)方法
Label 中常用的方法属性 UILabel *label =[[UILabel alloc]initWithFrame:CGRectMake(90, 100, 140, 40)];//设置Label ...
- Swift - 文本标签(UILabel)的用法
1,标签的创建 1 2 3 4 5 6 7 8 9 10 import UIKit class ViewController: UIViewController { override func ...
- iOS UIlabel怎么加载html字符串 富文本的用法
要加载html字符串,用人说,直接用webView啊!但是,有时候我们只需要显示2行文字,如此少的内容却要在复杂的UI排版中加入一个占用资源较多的webview,得不偿失.这里要说的是,我们其实可以用 ...
随机推荐
- 61.C++文件操作实现硬盘检索
#include <iostream> #include <fstream> #include <memory> #include <cstdlib> ...
- 6.cocos2d设置定时器
T1LayerAnchorPoint.h #pragma once #include "cocos2d.h" USING_NS_CC; class T1LayerAnchorPoi ...
- Sql Server 基础语法
来自:http://www.cnblogs.com/AaronYang/archive/2012/04/24/2468093.html Sql Server 基础语法 -- 查看数据表 select ...
- 【bzoj4864】神秘物质
Description 给出一个长度为n的序列,第i个数为ai,进行以下四种操作: merge x e:将当前第x个数和第x+1个数合并,得到一个新的数e: insert x e:在当前第x个数和第x ...
- 洛谷 P1177 【模板】快速排序(排序算法整理)
P1177 [模板]快速排序 题目描述 利用快速排序算法将读入的N个数从小到大排序后输出. 快速排序是信息学竞赛的必备算法之一.对于快速排序不是很了解的同学可以自行上网查询相关资料,掌握后独立完成.( ...
- hdu 3294 Girls' research
#include<stdio.h> #include<string.h> #define MAX 200020 char s[MAX],ss[MAX*2],str[2]; in ...
- Broadcast-广播的接收
至于广播的意思,不再赘述,直接看它的使用 先看代码 package com.example.test1123; import android.annotation.SuppressLint; impo ...
- Day3上午解题报告
预计分数:100+40+50=190 实际分数:100+40+50=190 T1 https://www.luogu.org/problem/show?pid=T15365 表示从来没做过博弈论的题, ...
- 3、Task.Factory属性
3.Task.Factory属性 Task类提供了一个Factory静态属性,这个属性返回一个TaskFactory对象. Task task = Task.Factory.StartNew(Task ...
- iTOP-4412 nfs文件系统启动
kernel command line type: 普通文件系统(本地)启动:root=/dev/mmcblk0p2 rootfstype=ext4 init=/linuxrc console=tty ...