English 中文(简体)
每一航海进口案文的最佳设想 主计长
原标题:Best idea for importing text to each NavigationController View
  • 时间:2009-11-04 16:46:28
  •  标签:

Hi everyone i want build a poem application so i want use to NavigationControlle for show each poem ! i mean i have a TableView and on there + 50 poems ! each cell have different poem ! so what can i do to import each text or HTML Files(My Pomes) to special view , that work with navigation controller ? is it good idea to use NSArray to show poem cells on the table view?

**TABLE VIEW**

Poem 1 >
-------------
Poem 2 >
-------------
Poem 3 >
-------------
Poem 4 >
------------
Poem 5 >

Poem 1 :
Say hello to world 
say hello to sky 
-----------------
Poem 2 :
Sea is blue 
Jungle is green !
-----------------
最佳回答

Regarding the table cells: The recommended way of creating table cells is to use UITableView s
- (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier
and re-set the cell s subview values to the current row/poem s properties.

关于导航控制器:

你应当只拥有一个导航控制员,高于表格。 当你想显示详细情况时,你只是与相关的第十一B条一道,创建了一个<条码>PoemDetailsViewController,在B中建立了分观点,然后用户在你的可调意见中点击了一张桌子:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    PoemDetailsViewController *poemDetails = [[[PoemDetailsViewController alloc] initWithNibName:@"PoemDetailsViewController" bundle:nil] autorelease];
    poemDetails.poem = [poems objectAtIndex:indexPath.row]; // assuming you have a single dimension array with poems and a single table group
    [self.navigationController pushViewController:poemDetails animated:YES];
}

导航控制员将自动建立背信 The和一切,确保<条码> 观点有一个导航项目。

问题回答

暂无回答




相关问题
热门标签