我创建了一个 UIViewController,然后在其中放置了一个 UITableView。最初它让我调整 UITableView 的大小,但现在它不再让我这样做了。未启用 UITableView 尺寸(它们显示 600 x 600)并且 handle 不会出现在 UITableView 的边缘以拖入 Storyboard。
谁能建议解决这个问题。我在这个问题上浪费了 2 天时间。
我已经删除了屏幕并多次重新创建它们,但同样的问题继续发生。
我想让 UITableView 占用的空间少于整个屏幕的原因是屏幕上也有一些按钮。
最佳答案
首先请为您的问题提供一些视觉效果。 你可以试试这个。
写下可能对你有帮助的代码
you.self.mainTableView.frame = CGRectMake(0,200,320,self.view.frame.size.height-200);
// You can set your x,y.hight,width .
或者
检查您的自动调整大小蒙版。这些很容易搞乱 View 结构。
或者
另请参阅此页面。 How to position a UITableView correctly at a fixed point from the top of the view
关于iOS/Xcode/ Storyboard : How to adjust size of UITableView in UIViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30547334/