Create UILabel in runtime

by alex 17. March 2009 09:11

UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 50, 70)];

label.numberOfLines = 2;

label.text@"text";

label.backgroundColor = [UIColor clearColor];

label.textColor = [UIColor blackColor];

 

label.highlightedTextColor = [UIColor blackColor];

label.textAlignment = UITextAlignmentLeft;

label.font = [UIFont systemFontOfSize:12];

[self.view addSubview:label];

[label release];

 


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

General

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen