iphone中动态表视图转到帧外高度
我这样写代码。但是第三个表将显示超出高度。超出高度是什么意思,您的意思是:a太大,b没有从正确的位置开始?另外,可以肯定的是,您使用的是RowHeight,但尚未在任何地方指定它。iphone中动态表视图转到帧外高度,iphone,objective-c,Iphone,Objective C,我这样写代码。但是第三个表将显示超出高度。超出高度是什么意思,您的意思是:a太大,b没有从正确的位置开始?另外,可以肯定的是,您使用的是RowHeight,但尚未在任何地方指定它。 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (tableView.tag == 101) { tableView.frame =
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (tableView.tag == 101)
{
tableView.frame = CGRectMake(tableView.frame.origin.x, tableView.frame.origin.y, tableView.frame.size.width, RowHeight * [lettersArray count]);
}
if (tableView.tag == 201)
{
NSLog(@"table Height is %f",RowHeight*[selectedCategoryArray count]);
tableView.frame = CGRectMake(tableView.frame.origin.x, tableView.frame.origin.y, tableView.frame.size.width, RowHeight * [selectedCategoryArray count]);
}
if (tableView.tag == 301)
{
NSLog(@"selectedSubCategoryArray count is %d",[selectedSubCategoryArray count]);
tableView.frame = CGRectMake(tableView.frame.origin.x, tableView.frame.origin.y, tableView.frame.size.width, RowHeight * [selectedSubCategoryArray count]);
}
return RowHeight;
}