Thursday, 17 January 2013

To create dynamically label



    
    UILabel *label  =  [[UILabel alloc]init];
    label.frame     =  CGRectMake(50,125,100,20);

    [label setFont:[UIFont fontWithName:@"Arial-BoldMT" size:18]];
    label.textColor=[UIColor whiteColor];
    label.backgroundColor=[UIColor clearColor];
    label.text      =  @"label";
    [self.view addSubview: label];