在 XIB 中创建嵌入式单元格?

nic*_*vey 5 objective-c uitableview ios

我目前正在尝试创建一个表格,该表格将显示用户正在下载的当前下载以及每个单元格中的进度条和详细信息。

我正在处理的项目正在使用 xib 和 xib 显然不支持表视图中的嵌入部分

Table views with embedded sections and cells are only supported in storyboard documents
Run Code Online (Sandbox Code Playgroud)

我可以将 Storyboard 用于独立的 UITableViewController 吗?如果是这样怎么办?

还有什么办法可以解决我想要做的事情吗?如果是这样,解决方法是什么?

提前谢谢我在过去的几个小时里一直坚持这个。

self.rootController = [[UITabBarController alloc] init];
ViewController1 *view2 = [[ViewController1 alloc] init];
TableViewController *view3 = [[TableViewController alloc] init];

view3.tabBarItem.title = @"Documents";
appWebView = [[WebViewController alloc] init];
appWebView.title = @"Browser";
appWebView.tabBarItem.title = @"Browser";
view2.title = @"Downloads";
self.rootController.viewControllers = [NSArray arrayWithObjects:appWebView, view2, view3,  nil];
self.window.rootViewController = self.rootController;
appWebView.tabBarItem.image = [UIImage imageNamed:@"Browser.png"];
view2.tabBarItem.image = [UIImage imageNamed:@"Download.png"];


 _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

[_window setRootViewController:appWebView];
[_window makeKeyAndVisible];
[_window addSubview:_rootController.view];
Run Code Online (Sandbox Code Playgroud)

^^ 是 AppDelegate,下面是我想使用故事板的视图

@interface TableViewController ()

@end

@implementation TableViewController



- (void)viewDidLoad
{
[super viewDidLoad];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"TableViewController" bundle:nil];
TableViewController *sfvc = [storyboard instantiateViewControllerWithIdentifier:@"TableViewController"];
[sfvc setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:sfvc animated:NO completion:nil];

}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
Run Code Online (Sandbox Code Playgroud)

use*_*279 0

我可以将 Storyboard 用于独立的 UITableViewController 吗?将箭头(位于第一个视图的左侧)拖到表格视图中,然后删除原始视图(或直接留在那里。

对于我想做的事情,还有办法解决这个问题吗?如果是这样,解决方法是什么?删除xib文件中tableViewDelegate下的“tableView”,重新添加“tableView”。那么一切都会好起来的。