摘要:
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,0,0)];这个frame是初设的,没关系,后面还会重新设置其size。[label setNumberOfLines:0];NSString *s = @"string......";UIFont *font = [UIFont fontWithName:@"Arial" size:12];CGSize size = CGSizeMake(320,2000);CGSize labelsize = [s sizeWithFont: 阅读全文
摘要:
一、UILabel(1)初始化UILabelC代码 UILabel*scoreLabel=[[UILabelalloc]initWithFrame:CGRectMake((self.bounds.size.width/2),0.0,150.0,43.0)];scoreLabel.textAlignment=UITextAlignmentCenter;scoreLabel.text=@"我是Ad";scoreLabel.textColor=[UIColorwhiteColor];scoreLabel.backgroundColor=[UIColorblackColor];sc 阅读全文