ios - ios视图在情节提要中调整大小但在运行时不显示
问题描述
我有一个包含子视图和表格视图的视图。请看下面的图片。我增加了情节提要中“CheckoutNTotal”视图的高度,并相应地调整了“Tbl Orders”的 x、y 坐标。但是当我在模拟器中运行它时,“CheckoutNTotal”视图没有显示全高。会发生什么。我还附加了故事板视图、运行时视图。感谢任何帮助。
编辑1:
感谢回复。您是说“调试”菜单下的“查看调试”吗?那没有显示任何东西。但我确实在控制台中看到了这些讨厌的约束消息:
以下列表中的至少一个约束可能是您不想要的。试试这个:(1)查看每个约束并尝试找出您不期望的;(2) 找到添加了一个或多个不需要的约束的代码并修复它。( "<_UILayoutSupportConstraint:0x600003a6c780 _UILayoutGuide:0x7f9269f2edd0.height == 64 (active)>", "<_UILayoutSupportConstraint:0x600003a6c460 V:|-(0)-[_UILayoutGuide:0x7f9269f2edd0] (active, names: '|'2e4f9260x )>", "<_UILayoutSupportConstraint:0x600003a6c960 _UILayoutGuide:0x7f9269f2f160.height == 49 (active)>", "<_UILayoutSupportConstraint:0x600003a6c7d0 _UILayoutGuide:0x7f9269f2f160.bottom == UIView:0x7f9269f,"," 0x600003a6d8b0 V:|-(84)-[UIStepper: 0x7f926b550320](活动,名称:'|':UIView:0x7f9269f2e660)>”,“<NSLayoutConstraint:0x600003a6da90 UILabel:0x7f9269f29c60'提示'.centerY == UIStepper:0x7f926b550320.centerY(活动)>”,“<0NSaLayoutConstraint:0x600003a6da90 :[UILabel:0x7f9269f29c60'提示']-(123)-| (活动,名称:'|':UIView:0x7f9269f2e660 )>”,“<NSLayoutConstraint:0x600003a6e260 V:[_UILayoutGuide:0x7f9269f2edd0]-(0)-[UIView:0x7f9269f2e660](活动)>”,“<NSLayoutConstraint:0x600003a6e :[UIView:0x7f9269f2e660]-(342)-[_UILayoutGuide:0x7f9269f2f160] (active)>", "<NSLayoutConstraint:0x600003a36990 'UIView-Encapsulated-Layout-Height' UIView:0x7f9269f2e4f0.height == 568 (active)>") ", "<NSLayoutConstraint:0x600003a6da90 UILabel:0x7f9269f29c60'Tip'.centerY == UIStepper:0x7f926b550320.centerY (active)>", "<NSLayoutConstraint:0x600003a6dbd0 V:[UILabel:0x7f9269f293c60'Tip']-| (活动,名称:'|':UIView:0x7f9269f2e660 )>”,“<NSLayoutConstraint:0x600003a6e260 V:[_UILayoutGuide:0x7f9269f2edd0]-(0)-[UIView:0x7f9269f2e660](活动)>”,“<NSLayoutConstraint:0x600003a6e :[UIView:0x7f9269f2e660]-(342)-[_UILayoutGuide:0x7f9269f2f160] (active)>", "<NSLayoutConstraint:0x600003a36990 'UIView-Encapsulated-Layout-Height' UIView:0x7f9269f2e4f0.height == 568 (active)>") ", "<NSLayoutConstraint:0x600003a6da90 UILabel:0x7f9269f29c60'Tip'.centerY == UIStepper:0x7f926b550320.centerY (active)>", "<NSLayoutConstraint:0x600003a6dbd0 V:[UILabel:0x7f9269f293c60'Tip']-| (活动,名称:'|':UIView:0x7f9269f2e660 )>”,“<NSLayoutConstraint:0x600003a6e260 V:[_UILayoutGuide:0x7f9269f2edd0]-(0)-[UIView:0x7f9269f2e660](活动)>”,“<NSLayoutConstraint:0x600003a6e :[UIView:0x7f9269f2e660]-(342)-[_UILayoutGuide:0x7f9269f2f160] (active)>", "<NSLayoutConstraint:0x600003a36990 'UIView-Encapsulated-Layout-Height' UIView:0x7f9269f2e4f0.height == 568 (active)>") ", "<NSLayoutConstraint:0x600003a6dbd0 V:[UILabel:0x7f9269f29c60'Tip']-(123)-| (活动,名称:'|':UIView:0x7f9269f2e660 )>”,“<NSLayoutConstraint:0x600003a6e260 V:[_UILayoutGuide:0x7f9269f2edd0]-(0)-[UIView:0x7f9269f2e660](活动)>”,“<NSLayoutConstraint:0x600003a6e :[UIView:0x7f9269f2e660]-(342)-[_UILayoutGuide:0x7f9269f2f160] (active)>", "<NSLayoutConstraint:0x600003a36990 'UIView-Encapsulated-Layout-Height' UIView:0x7f9269f2e4f0.height == 568 (active)>") ", "<NSLayoutConstraint:0x600003a6dbd0 V:[UILabel:0x7f9269f29c60'Tip']-(123)-| (活动,名称:'|':UIView:0x7f9269f2e660 )>”,“<NSLayoutConstraint:0x600003a6e260 V:[_UILayoutGuide:0x7f9269f2edd0]-(0)-[UIView:0x7f9269f2e660](活动)>”,“<NSLayoutConstraint:0x600003a6e :[UIView:0x7f9269f2e660]-(342)-[_UILayoutGuide:0x7f9269f2f160] (active)>", "<NSLayoutConstraint:0x600003a36990 'UIView-Encapsulated-Layout-Height' UIView:0x7f9269f2e4f0.height == 568 (active)>")
将尝试通过打破约束来恢复 <NSLayoutConstraint:0x600003a6da90 UILabel:0x7f9269f29c60'Tip'.centerY == UIStepper:0x7f926b550320.centerY (active)>
在 UIViewAlertForUnsatisfiableConstraints 创建一个符号断点以在调试器中捕获它。<UIKitCore/UIView.h> 中列出的 UIView 上的 UIConstraintBasedLayoutDebugging 类别中的方法也可能会有所帮助。
所以我想我需要修复它们。
解决方案
推荐阅读
- ios - 环境变量更改时视图不更新
- android - 从 Android 上已安装的应用程序中获取非自适应图标
- java - 在模块 jetified-play-services-vision-20.0.0-runtime 中发现重复的类 com.google.android.gms.internal.vision.zze
- c - 将 XC16 集成到 Visual Studio Makefile 项目中
- javascript - 拥有一系列允许的 iFrame 来源的安全问题?
- powerapps - PowerApps 日期格式
- image - 失败时重新加载缓存的网络映像
- python - Taking every first, second, third elements from two lists
- angular - subscribe to websocket subject create multiple connections
- activerecord - Active Record Where Year of Date Field Greater Than Equal Current Year