iOS/Xcode/ Storyboard : How to adjust size of UITableView in UIViewController

标签 ios xcode uitableview storyboard

我创建了一个 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/

相关文章:

ios - 添加到默认钱包应用程序的通行证的推送通知

ios - 如何在 iOS 设备上打开 iOS 应用程序调试期间创建的 txt 文件

Xcode 不会在断点处停止

iOS Segue 打开两个 View Controller (假设单击了两个表格单元格)

ios - 在 iPhone 的 UITableViewController 中列出歌曲?在 Storyboard 中工作,并非没有它

ios - 通过 FMDB 将数组传递给 sqlite WHERE IN 子句?

ios - NSStream 委托(delegate)未触发错误

ios - Swift 我需要 layoutifneeded() 吗

iOS - 以编程方式实现 SFGaugeView

ios - 为什么 UITableViewCell 多行只能达到单元格宽度的一半?