
Hi,
How to create UILabel programmatically?
Thanks

Hi,
Following code can be used to create UILabel programmatically:
UILabel *lblMyLable = [[[UILabel alloc] initWithFrame:CGRectMake(50,118, 600, 40)]autorelease]; lblMyLable.lineBreakMode = UILineBreakModeWordWrap; lblMyLable.numberOfLines = 0;//Dynamic lblMyLable.tag=1301; lblMyLable.backgroundColor = [UIColor clearColor]; lblMyLable.text = @"One"; [self.view addSubview:lblMyLable];
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.