0

我正在做一个项目,我必须在其中显示这样的视图在这里感到沮丧,因为我的视图不会发生任何事情。这些是添加到视图上的文本字段,并且都是可点击的,任何人都可以帮助我,我是一个新手,所以请帮助我。

在此处输入图像描述

4

1 回答 1

0
    //////////////////
    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
    {
        if(section==0)
        {
            return self.view_header;
        }

        return nil;
    }

    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
    {
        CGFloat height =0.00;

        if(section==0)
        {
            height = 32;
        }     

        return height;
    }

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 
    {    

        if(indexPath.section == 1)
        {
            return 51; 
        }
        else
        {
            return 35;
        }
    }



    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

        if(self.flag_loadCompleted == TRUE)
        {
            return 1;
        }
        return 2;
    }


    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {  

        if(section == 0)
        {
            return [self.arr_data count];
        }
        else if(section == 1)
        {
            return 1;
        }

        return 0;
    }
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {    

    static NSString *CellIdentifier = @"MyTemplate";
    MyFinancialTemplate *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if(cell == nil)
    {
        cell = [MyFinancialTemplate createNewTextCellFromNib];
    }    
    cell.index = indexPath.row;  
    if(indexPath.section == 0)
    {
        cell.index = indexPath.row;
        cell.flag_loader = FALSE;

        cell.selectionStyle = UITableViewCellSelectionStyleGray;
    }
    else
    {
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.flag_loader = TRUE;
    }

    [cell LoadCell];

    return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {   

}
于 2013-06-18T13:08:24.453 回答