Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/44.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iphone中动态表视图转到帧外高度_Iphone_Objective C - Fatal编程技术网

iphone中动态表视图转到帧外高度

iphone中动态表视图转到帧外高度,iphone,objective-c,Iphone,Objective C,我这样写代码。但是第三个表将显示超出高度。超出高度是什么意思,您的意思是:a太大,b没有从正确的位置开始?另外,可以肯定的是,您使用的是RowHeight,但尚未在任何地方指定它。 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if (tableView.tag == 101) { tableView.frame =

我这样写代码。但是第三个表将显示超出高度。

超出高度是什么意思,您的意思是:a太大,b没有从正确的位置开始?另外,可以肯定的是,您使用的是RowHeight,但尚未在任何地方指定它。
- (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;
}