<bdo id='Ob0CK'></bdo><ul id='Ob0CK'></ul>

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

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

        <tfoot id='Ob0CK'></tfoot>
      1. <legend id='Ob0CK'><style id='Ob0CK'><dir id='Ob0CK'><q id='Ob0CK'></q></dir></style></legend>
      2. 在 Storyboard 中创建自定义 UITableViewCell

        时间:2023-05-30

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

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

              1. <small id='XPNBL'></small><noframes id='XPNBL'>

                <tfoot id='XPNBL'></tfoot>

                  本文介绍了在 Storyboard 中创建自定义 UITableViewCell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  想要创建一个静态菜单 (IOS 5) 并尝试在情节提要中创建自定义单元格,然后加载到分组的 tableview 上.

                  Wanting to create a static menu (IOS 5) and attempting to create custom cells within the storyboard to then load onto the grouped tableview.

                  我已经创建了插座

                  @property(nonatomic,strong) IBOutlet UITableViewCell *labelCell;
                  

                  ViewController 类已设置为正确的 TableViewController,并且我已将自定义单元格连接到此插座.

                  The ViewController class is set to the proper TableViewController and I've connected the custom cell to this outlet.

                  我还设置了委托和数据源.

                  I also have the delegate and datasource set up.

                  我有

                  -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath   *)indexPath
                  {
                    return self.labelCell;
                  }
                  

                  我确定这有很多问题,但我只是想显示一个单元格并从那里开始.似乎没有任何通过情节提要在 IB 中进行自定义单元格的示例.我仍然可以使用创建 xib 文件并将其加载到 mainBundle 中的旧方法,但我想我只想保持最新状态.

                  I'm sure there is a ton wrong with this, but I'm just trying to display one cell and go from there. There does not seem to be any examples of doing custom cells within the IB through the storyboard. I can still use the old way of creating a xib file and loading it in the mainBundle but I just want to stay up to date I guess.

                  但是当我加载这个视图控制器时,我得到了一个崩溃.SIGABRT

                  but with what I have above i get a crash when I load this view controller. SIGABRT

                  推荐答案

                  如果您已将 UITableView 设置为在情节提要中使用静态单元格",则无需实现任何UITableViewDataSource 方法,您可以直接在 Interface Builder 中修改单元格.对于单个标签单元格,选择该单元格并将其类型更改为基本".您现在可以像编辑任何其他视图对象一样编辑单元格.

                  If you have set your UITableView to be using 'Static Cells' in the storyboard, you don't need to implement any of the UITableViewDataSource methods and you can modify the cell directly in Interface Builder. For a single label cell, select the cell and change it's type to 'Basic'. You can now edit the cell just like you would any other view object.

                  这篇关于在 Storyboard 中创建自定义 UITableViewCell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用故事板的优点和缺点 下一篇:架构 i386 的未定义符号将项目升级到 iOS 5

                  相关文章

                  最新文章

                  <tfoot id='ks1IO'></tfoot>
                • <legend id='ks1IO'><style id='ks1IO'><dir id='ks1IO'><q id='ks1IO'></q></dir></style></legend>

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

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