[英]When UITableViewController is a child of UITabBarController, scrolling does not work
I created 4 different UITableViewControllers
, wrapped them into the respective 4 UINavigationControllers
and added all of them to UITabBarViewController
, like this: 我创建了4个不同的
UITableViewControllers
,将它们分别包装到4个UINavigationControllers
,并将它们全部添加到UITabBarViewController
,如下所示:
UITabBarController *tabBarController = [[UITabBarController alloc]init];
tabBarController.viewControllers = @[navIVC, navLVC, navFVC, navSVC];
in AppDelegate.m
在
AppDelegate.m
Then, in a UITableViewController
scrolling is not working, the image is below. 然后,在
UITableViewController
滚动不起作用,图像如下。
So, I can not for some reason scroll further down; 因此,由于某种原因,我无法向下滚动; there is still a plenty of cells below.
下面仍然有很多单元格。 How could I make it scrolling?
如何滚动? I tried enabling scrolling like this:
self.tableView.scrollEnabled = YES;
我尝试启用这样的滚动:
self.tableView.scrollEnabled = YES;
, but it does not work. ,但不起作用。 The problem is similar to the following unanswered one: UITableViewController is not scrolling
该问题类似于以下未解决的问题: UITableViewController不滚动
Sorry for the stupid question. 很抱歉这个愚蠢的问题。 The problem is that I am very new to Xcode and its infrastructure.
问题是,我对Xcode及其基础结构非常陌生。 So, when the simulator launches it shows me scrollbar that is actually appearing just because I have small screen size of my laptop and it is just for viewing the simulator's screen.
因此,当模拟器启动时,它会显示滚动条实际上是由于我的笔记本电脑的屏幕尺寸很小而出现的,并且仅用于查看模拟器的屏幕。 The scrollbar was misleading for me.
滚动条对我有误导作用。 The only thing that I needed to do is to click and then scroll.
我唯一需要做的就是单击然后滚动。 In other words, everything is (and was) working perfectly.
换句话说,一切都(并且过去)运行良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.