UI2_UILabel
来源:互联网 发布:苹果手机安装不了淘宝 编辑:程序博客网 时间:2024/04/30 15:13
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]; [_window release];**UILabel**UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 150, 50)];label.backgroundColor = [UIColor yellowColor];[self.window addSubview:label];[label release];// 能显示文本内容label.text = @"测试一下,aaaa.aafjskwevdsfcds的的的的的fc的";// 给label加上一个边框,并且给它加上一个弧度label.layer.borderWidth = 1;label.layer.cornerRadius = 10;*隐藏多余部分*// 让label多余的部分隐藏掉label.layer.masksToBounds = YES;// 修改字体大小label.font = [UIFont systemFontOfSize:25];// 修改文字颜色label.textColor = [NSColor cyanColor];// 对齐方式label.textAlignment = NSTextAlignmentCenter;// 设置行数label.numberOfLines = NSIntegerMax;// 可以自动适应文本内容[label sizeToFit];// 阴影颜色和大小label.shadowColor = [UIColor redColor];label.shadowOffset = CGSizeMake(2, 2);label.center = CGPointMake(100, 100); return YES;}
0 0
- UI2_UILabel
- java 修饰符全解
- 学生成绩同一行显示或者课程安排按照一周星期的显示
- 小用hibernate二级缓存
- Hibernate常见错误
- Spark-IDEA源码阅读环境搭建(Windows)
- UI2_UILabel
- Servlet学习笔记--生成网站表单验证码
- hibernate.cfg.xml配置文件和hbm.xml配置文件
- 前台超出多少字省略号显示
- 项目开发
- Toolbar,DrawerLayout,PagerSlidingTabStrip 草丛三基友实现常规home页面
- 第三周 项目四 顺序表的应用
- iOS项目中全局变量的定义与使用
- CentOS 6.3 32位静默安装Oracle 11g r2详细教程