#define ZIFont1 14.0f
#define ZIFont2 12.0f
#define ZIFont3 11.0f
#define Collor1 [UIColor redColor]
#define Collor2 [UIColor blueColor]
#define Collor3 [UIColor blackColor]
NSInteger allY=0; [self.view setBackgroundColor:BACKGROUND_COLOR];
self.navigationItem.title=@"新手帮助";
NSString * string =@"用户首次进入咔咕会要求登录,如果您已经的是PC咔咕的用户,可以直接用同样的账号和密码登录。";
CGSize size=[string sizeWithFont:[UIFont systemFontOfSize:ZIFont1] constrainedToSize: CGSizeMake( 310.0, MAXFLOAT ) lineBreakMode:UILineBreakModeWordWrap];
//在给定字符串的字体,宽度情况下得到字符串的高度
UILabel * label1=[[UILabel alloc]initWithFrame:
CGRectMake(20, allY+10, size.width, size.height+10)];
allY=allY+label1.frame.size.height;
label1.numberOfLines=0;
label1.textColor=Collor1;
label1.lineBreakMode=UILineBreakModeWordWrap;
label1.font=[UIFont systemFontOfSize:ZIFont1];
//设置UILable的字体和上面字符串的字体一样,这样才能完全显示出来
label1.backgroundColor=[UIColor clearColor];
label1.text=string; [scrollView addSubview:label1];
[label1 release];