Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我以编程方式隐藏字段时,它会留下如下空白:
如何使所有波纹管字段向上移动以填充空白?此外,当我使隐藏字段可见时,它下面的所有字段都应该向下移动到该字段的房间。
这就是我隐藏 TextField 的方式:
[self.txtFieldEmail setHidden:YES];
你需要自己做。您可以使用表格视图并打开和关闭城镇(但索引可能很复杂)。或者,您可以layoutSubviews在容器中实现以在配置更改时布置所有内容。无论哪种方式,您都需要维护状态和逻辑来执行此操作。您也许可以在 GitHub 上找到第 3 方解决方案...
layoutSubviews