0
내 문제는 this과 비슷합니다. 내 UITableViewCell Height
은 (는) IOS8
에서 작업 중입니다. 문제 IOS7
높이가 증가하지만 내용이 표시되지 않습니다.UITableview IOS7에서 셀 높이가 작동하지 않습니다.
내 코드는 다음과 같습니다
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
long hightmain=0;
if(selectIndex && indexPath.section == selectIndex.section)
{
NSString * myString = [description_vegetable_array objectAtIndex:indexPath.section];
CGSize labelSize = [myString sizeWithFont:[UIFont systemFontOfSize:15] constrainedToSize:CGSizeMake(190, MAXFLOAT) lineBreakMode:NSLineBreakByWordWrapping];
hightmain=labelSize.height+120;
if (hightmain<=140)
{
btn11.frame=CGRectMake(240,100,70,17);
Description_LBL.frame=CGRectMake(127, 0, 190, 140);
BGImage.frame=CGRectMake(0, -3, 320, 140);
}
else
{
[btn11 setTitle:@"Less Info" forState:UIControlStateNormal];
btn11.frame=CGRectMake(240,hightmain-30,70,17);
Description_LBL.frame=CGRectMake(127, -20, 190, hightmain);
BGImage.frame=CGRectMake(0, -3, 320, hightmain);
return hightmain;
}
}
else
{
return 140;
}
}
Description_LBL.frame=CGRectMake(127, 0, 190, 140);
내 라벨의 높이가 증가하지만 텍스트가 표시되지 ....
아이폰 OS 7.0에서 사용되지 않는? –
no. xib를 사용하고 자동 레이아웃이 꺼져 있습니다 –
(hightmain <= 140) – Sulabh