我有以下代码来调整标签的高度,但它不起作用。它显示带有.....的文本我做错了什么?
float storeAddress1YOffset=10;
float storeAddress1XWidth=scrollView.frame.size.width;
float storeAddressLabel1YHeight=15;
UILabel *storeAddressLabel=[[UILabel alloc]initWithFrame:CGRectMake(Xoffset,storeSectionHeight+ storeAddress1YOffset,storeAddress1XWidth, storeAddressLabel1YHeight) ];
storeAddressLabel.font=[UIFont fontWithName:@"GillSans" size:15.0f];
currentHeight=currentHeight + storeAddress1YOffset + storeAddressLabel1YHeight;
[storeAddressLabel setText:fullAddress];
CGRect labelFrame = storeAddressLabel.frame;
labelFrame.size = [fullAddress sizeWithFont:storeAddressLabel.font
constrainedToSize:CGSizeMake(storeAddressLabel.frame.size.width, CGFLOAT_MAX)
lineBreakMode:storeAddressLabel.lineBreakMode];
storeAddressLabel.frame = labelFrame;