创建uilabel的代码如下
- (void)viewDidLoad {
[super viewDidLoad];
UILabel *lbWtq = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 50)] autorelease];
lbWtq.text=@"this is my name";
//[lbWtq setText:@"text"];
[self.view addSubview:lbWtq];
}
创建uilabel的代码如下
- (void)viewDidLoad {
[super viewDidLoad];
UILabel *lbWtq = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 50)] autorelease];
lbWtq.text=@"this is my name";
//[lbWtq setText:@"text"];
[self.view addSubview:lbWtq];
}
转载于:https://www.cnblogs.com/85538649/archive/2011/10/05/2199288.html