iOS UI01_Label
来源:互联网 发布:update sql 所有数据 编辑:程序博客网 时间:2024/06/05 10:14
@implementation AppDelegate
-(void)dealloc
{
[_window release];
[superdealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColorwhiteColor];
[self.windowmakeKeyAndVisible];
[_window release];
//UILabel显示文本内容
UILabel *label=[[UILabelalloc]initWithFrame:CGRectMake(100, 100, 200, 150)];
label.backgroundColor=[UIColorcyanColor];
[self.windowaddSubview:label];
[labelrelease];
// 设置文本内容
label.text=@"学习iOS! ! !";
//文本内容颜色
label.textColor=[UIColoryellowColor];
//文本对齐方式
label.textAlignment=NSTextAlignmentCenter;
// 字体大小
label.font=[UIFontsystemFontOfSize:25];
// 设置行数
// 0是行数的最大值
label.numberOfLines=3;
//让文本自己去适应尺寸
// [label sizeToFit];
//断行模式
label.lineBreakMode=NSLineBreakByTruncatingMiddle;
//阴影颜色
label.shadowColor=[UIColorredColor];
//阴影大小
label.shadowOffset=CGSizeMake(2, 1);
//设置边框
label.layer.borderWidth=1;
//设置圆角
label.layer.cornerRadius=100;
label.layer.masksToBounds=YES;
// 中心点的位置 center可以修改视图的位置 frame可以修改尺寸
label.frame=CGRectMake(100, 100, 200, 200);
label.center =CGPointMake(200, 200);
return YES;
}
- iOS UI01_Label
- iOS
- iOS
- IOS
- iOS
- iOS
- IOS
- ios
- iOS
- iOS
- IOS
- iOS
- ios
- ios ~~~~~
- ios
- IOS
- IOS
- IOS
- yii rules使用 获取error信息
- Oracle语句优化规则汇总(8)
- Mono源代码学习笔记:Console类(五)
- SQL基础大集合
- OpenSSL库的RSA使用(下)-rsa函数方式
- iOS UI01_Label
- Mono源代码学习笔记:Console类(四)
- Oracle语句优化规则汇总(9)
- scikit-learn:3.4. Model persistence
- C 实现最小二乘,步骤以及代码
- Mono源代码学习笔记:Console类(三)
- 上位机学习笔记汇总
- Spring讲解------------本专栏代码包以及word版
- springMVC的全流程使用和分析