简体   繁体   English

ios,单元格上的静态表视图标签存在问题

[英]ios, problems with static table view labeling on cells

when I put a label on my static cell it does not stay in the view. 当我在静态单元格上放置标签时,它不会停留在视图中。

What it looks like in storyboard. 故事板中的外观。 在此处输入图片说明

What it looks like on the simulator. 模拟器上的外观。 在此处输入图片说明

在此处输入图片说明

I'm trying to add a textField too. 我也在尝试添加textField。 在此处输入图片说明

thanks for any help. 谢谢你的帮助。

Perhaps xcode has a bug? 也许xcode有错误? I'm not sure, but I had to add constraints to my label and textField in order for them to stay in the table view cell. 我不确定,但是必须将约束添加到标签和textField中,以便它们保留在表视图单元格中。 All is well. 一切都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM