0

私はコードの一部で遊んでいます、そしてこれは私がこれまでに得たものです。アプリは、求人広告を表示するためのXMLフィードを取得し、添付した画像のように表示します。

私が理解しようとしているのは、「説明」部分にXMLファイルから取得したすべての情報を表示させる方法です。

この方法で何かを変更することで答えは隠されますか?

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}

switch(indexPath.section)
{
    case 0:
        cell.text = aBook.title;
        break;
    case 1:
        cell.text = aBook.author;
        break;
    case 2:
        cell.text = aBook.summary;
        break;
}

return cell;

}

仕事のリスト

仕事の詳細

4

1 に答える 1

0

これを実装してみてください:

-(CGFloat ) tableView:(UITableView*) tableView heightForRowAtIndexPath:(NSIndexPath*) indexPath
{
If(indexPath.section==2)
{
return 60;
}
}
于 2012-06-04T15:51:14.733 に答える