Friday, 18 May 2012

how to make custom label in iphone sdk

UILabel *lblDetail = [[UILabel alloc] initWithFrame:CGRectMake(85, 30, 165, 20)];
    lblDetail.text = [[CategoryArray objectAtIndex:indexPath.row] valueForKey:@"s_desc"];
    lblDetail.textAlignment = UITextAlignmentLeft;
    lblDetail.textColor = [UIColor grayColor];
    lblDetail.backgroundColor = [UIColor clearColor];
    lblDetail.font = [UIFont fontWithName:@"Verdana" size:10];
    lblDetail.numberOfLines=0;
    lblDetail.lineBreakMode = UILineBreakModeTailTruncation;
    [cell addSubview:lblDetail];
    [lblDetail release];

No comments:

Post a Comment