UI编程_UILabel及其属性
来源:互联网 发布:如何写bat文件运行java 编辑:程序博客网 时间:2024/04/28 07:59
//// AppDelegate.m// UI01_UILabel//// Created by dllo on 15/7/10.// Copyright (c) 2015年 dllo. All rights reserved.//#import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; #pragma mark - 知识点2 UILabel /* 创建label对象 */ UILabel *userLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 100, 300, 200)]; userLabel.backgroundColor = [UIColor yellowColor]; [self.window addSubview:userLabel]; /* 设置相关的属性(常用API), attribute text调研 */ userLabel.text = @"用户名户名用户名名用名:"; /* font 属性, UIFont类, 调研一下(如何更改字体, 如何加载第三方字体) */ userLabel.font = [UIFont systemFontOfSize:26]; /* 文本颜色 调研一下(自定义颜色)*/ userLabel.textColor = [UIColor darkGrayColor]; /* 对齐方式 */ userLabel.textAlignment = NSTextAlignmentRight; /* 断行模式(省略) */ userLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; /* 行数设置(设置为0:不受行数限制, 并且不会超过labele的限制) */ userLabel.numberOfLines = 0; /* 阴影设置 */ userLabel.shadowColor = [UIColor redColor]; userLabel.shadowOffset = CGSizeMake(0, 2); [userLabel release]; [_window release]; return YES;}@end
0 0
- UI编程_UILabel及其属性
- UI笔记_UILabel
- IOS(UI)_UILabel(标签)
- IOS(UI)_UILabel(标签)
- UI动画属性及其说明
- UI编程:UIView及其子类
- UI编程-UIView及其⼦子类
- Android UI美化之 shape的使用及其属性总结
- 初步认识UI开发---六种布局及其属性
- Android用户界面 UI组件--TextView及其子类(二) Button,selector选择器,sharp属性
- IOS开发UI—纯代码实现控件及其基本属性
- UI元素及其控制
- ui.ImageView及其子类
- ui.ProcessBar及其子类
- ui.Dialog及其子类
- ui.TextView及其子类
- ui.AdapterView及其子类
- UI - UIControl及其子类
- linux下出现ping:unknown host www.baidu.com问题时的解决办法——ubuntu下局域网络的配置
- 详解网络传输中的三张表,MAC地址表、ARP缓存表以及路由表
- android开发中常用的快捷键
- C++ 函数指针
- 关于String Stringbuffer StringBuilder
- UI编程_UILabel及其属性
- 李显龙:会C++的新加坡总理
- 在 Mac OS X 终端里使用 Solarized 配色方案
- BZOJ 2927 POI1999 多边形之战 博弈论
- CLRS 1.1算法
- Nginx源代码分析之I/O模型细节(七)
- J2EE设计模式——DAO
- c++primer要点-拷贝控制
- xdebug 和 phpstorm 远程调试配置