我已经尝试了此 post 中图像的解决方案.但是,它仅在首次加载屏幕时才有效,当应用程序从屏幕的子级再次返回该屏幕时,它会返回以切断 tableview。
在我 NSLog viewWillAppear 中的 tableview 高度之后:
340.00 (tableview first loaded)
245.00 (tableview re-appeared)
有什么我想念的吗?
我也尝试添加
tableResult.autoresizingMask &= ~UIViewAutoresizingFlexibleBottomMargin;
和
tableResult.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleHeight ;
但它们都不起作用。
最佳答案
您应该将表格的高度设置为灵活:
tableResult.autoresizingMask = UIViewAutoresizingFlexibleHeight;
关于ios - 如何使 UITableview 与 iPhone 5 屏幕尺寸相匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16055932/