iphone 创建uilabel

创建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];

}


 

posted on 2011-10-05 11:25  wtq  阅读(411)  评论(0编辑  收藏  举报