1. <i id='eW6OH'><tr id='eW6OH'><dt id='eW6OH'><q id='eW6OH'><span id='eW6OH'><b id='eW6OH'><form id='eW6OH'><ins id='eW6OH'></ins><ul id='eW6OH'></ul><sub id='eW6OH'></sub></form><legend id='eW6OH'></legend><bdo id='eW6OH'><pre id='eW6OH'><center id='eW6OH'></center></pre></bdo></b><th id='eW6OH'></th></span></q></dt></tr></i><div id='eW6OH'><tfoot id='eW6OH'></tfoot><dl id='eW6OH'><fieldset id='eW6OH'></fieldset></dl></div>

    <small id='eW6OH'></small><noframes id='eW6OH'>

    • <bdo id='eW6OH'></bdo><ul id='eW6OH'></ul>

    <tfoot id='eW6OH'></tfoot>
      <legend id='eW6OH'><style id='eW6OH'><dir id='eW6OH'><q id='eW6OH'></q></dir></style></legend>

    1. 将文本导入每个 NavigationController 视图的最佳方法

      Best idea for importing text to each NavigationController View(将文本导入每个 NavigationController 视图的最佳方法)
        <tbody id='Zbeyl'></tbody>

      <i id='Zbeyl'><tr id='Zbeyl'><dt id='Zbeyl'><q id='Zbeyl'><span id='Zbeyl'><b id='Zbeyl'><form id='Zbeyl'><ins id='Zbeyl'></ins><ul id='Zbeyl'></ul><sub id='Zbeyl'></sub></form><legend id='Zbeyl'></legend><bdo id='Zbeyl'><pre id='Zbeyl'><center id='Zbeyl'></center></pre></bdo></b><th id='Zbeyl'></th></span></q></dt></tr></i><div id='Zbeyl'><tfoot id='Zbeyl'></tfoot><dl id='Zbeyl'><fieldset id='Zbeyl'></fieldset></dl></div>

        <small id='Zbeyl'></small><noframes id='Zbeyl'>

          <tfoot id='Zbeyl'></tfoot>

                <bdo id='Zbeyl'></bdo><ul id='Zbeyl'></ul>
                <legend id='Zbeyl'><style id='Zbeyl'><dir id='Zbeyl'><q id='Zbeyl'></q></dir></style></legend>
              • 本文介绍了将文本导入每个 NavigationController 视图的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                大家好,我想构建一个诗歌应用程序,所以我想使用 NavigationControlle 来显示每首诗歌!我的意思是我有一个 TableView,上面有 50 首诗!每个细胞都有不同的诗!那么我该怎么做才能将每个文本或 HTML 文件(我的 Pomes)导入到与导航控制器一起使用的特殊视图中?使用 NSArray 在表格视图上显示诗歌单元格是个好主意吗?

                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 !
                -----------------
                

                推荐答案

                关于表格单元格:创建表格单元格的推荐方法是使用 UITableView
                - (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier
                并将单元格的子视图值重新设置为当前行/诗歌的属性.

                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.

                关于导航控制器:

                表格视图上方应该只有一个导航控制器.当您想显示一首诗的详细信息时,您只需创建一个带有关联 XIB 的 PoemDetailsViewController,在 IB 中设置子视图,连接它们,然后当用户单击表格行时,在您的 UITableView 中代表:

                You should just have one navigation controller above the table view. When you want to show a poem's details, you just create a PoemDetailsViewController with an associated XIB, set up the sub-views in IB, connect them, then when a user clicks a table row, in your UITableView's delegate:

                - (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];
                }
                

                导航控制器会自动设置你的后退按钮和一切,只要确保 PoemDetailsView 有一个导航项.

                The navigation controller will automatically set up your back button and everything, just make sure the PoemDetailsView has a navigation item.

                这篇关于将文本导入每个 NavigationController 视图的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                How to convert 32 bit PNG to RGB565?(如何将 32 位 PNG 转换为 RGB565?)
                Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                Game center facebook like(游戏中心 facebook 喜欢)
                Objective-C++ importing C++ class fails, cassert not found(Objective-C++ 导入 C++ 类失败,未找到 cassert)
                  <tbody id='PyYWk'></tbody>

                    • <bdo id='PyYWk'></bdo><ul id='PyYWk'></ul>

                      <small id='PyYWk'></small><noframes id='PyYWk'>

                      <tfoot id='PyYWk'></tfoot>

                        <i id='PyYWk'><tr id='PyYWk'><dt id='PyYWk'><q id='PyYWk'><span id='PyYWk'><b id='PyYWk'><form id='PyYWk'><ins id='PyYWk'></ins><ul id='PyYWk'></ul><sub id='PyYWk'></sub></form><legend id='PyYWk'></legend><bdo id='PyYWk'><pre id='PyYWk'><center id='PyYWk'></center></pre></bdo></b><th id='PyYWk'></th></span></q></dt></tr></i><div id='PyYWk'><tfoot id='PyYWk'></tfoot><dl id='PyYWk'><fieldset id='PyYWk'></fieldset></dl></div>

                        <legend id='PyYWk'><style id='PyYWk'><dir id='PyYWk'><q id='PyYWk'></q></dir></style></legend>