NIB文件中的静态表格单元格 [英] Static Table Cells in NIB File

查看:67
本文介绍了NIB文件中的静态表格单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个具有自定义静态单元格的表视图的nib文件?我想创建一个包含所有静态内容的表格式表格视图,但我目前没有使用故事板。我能够在我的应用程序的默认Storyboard中找到内容类型菜单,但我正在使用Nib,当我创建UIViewController nib或UITableViewController nib时,在两种情况下,Attributes检查器中都没有内容类型菜单标签。

Is it possible to create a nib file that has a table view with custom static cells? I want to create a form-like table view with all static content, but I'm not currently using storyboards. I was able to find the content type menu in the default Storyboard of my app, but I'm using Nibs, and when I create either a UIViewController nib or a UITableViewController nib, in both cases there is no content type menu in the Attributes inspector tab.

有什么想法吗?

推荐答案

现在看来,我想要做的就是不支持。我在Apple上提交了一个Radar bug,但这里的解决方法对我有用。

It seems like at the moment, what I'm trying to do is just not supported. I filed a Radar bug on Apple, but here's the workaround that worked for me.

只需使用故事板,并使用以下方式将其称为笔尖:

Just use a storyboard, and call it like a nib using:

UIStoryboard *sb = [UIStoryboard storyboardWithName:@"EditProfile" bundle:nil];
EditProfileTVC *vc = [sb instantiateViewControllerWithIdentifier:@"EditProfile"];
vc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self.navigationController pushViewController:vc animated:YES];

在故事板中,您将要作为EditProfile启动的视图控制器命名为,在这种情况下。希望这可以帮助别人。

Where in your storyboard, you name the view controller you want to start on as EditProfile, in this case. Hope this helps someone out.

这篇关于NIB文件中的静态表格单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆