4
我目前正在尝试创建一个表格,该表格将显示用户正在使用进度条和每个单元格中的详细信息下载的当前下载内容。在XIB中创建嵌入式单元格?
项目IM工作的使用厦门国际银行厦门国际银行,并显然不支持嵌入部分在表视图
Table views with embedded sections and cells are only supported in storyboard documents
我可以用故事板为一个独立的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];
^^是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.
}
制作独立故事板就像使用它一样简单一个xib。阅读[docs](https://developer.apple.com/library/ios/featuredarticles/viewcontrollerpgforiphoneos/UsingViewControllersinYourApplication/UsingViewControllersinYourApplication.html)。 – CrimsonChris
UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@“TableViewController”捆绑:无]; TableViewController * sfvc = [storyboard instantiateViewControllerWithIdentifier:@“TableViewController”]; [sfvc setModalPresentationStyle:UIModalPresentationFullScreen]; [self presentViewController:sfvc animated:NO completion:nil];我现在得到这个“警告:试图展示谁的观点不在窗口层次!” – nickivey
我发现把前两行放在视图控制器的init方法中很方便。 – CrimsonChris