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.
实际上,我在视图中显示大约 10-15 行标签和按钮控件时遇到问题。然后我使用 UIScroll 视图来实现这一点,但这破坏了设计的外观。
如您所见,生成的输出与开发时 Xcode 中的外观不同。
请指导我应该怎么做才能呈现正确的设计?
谢谢阿什什
见附图:
创建一个自定义UITableViewCell并在您的代码中使用该自定义。
UITableViewCell
并cellForRowAtIndexPath为您的单元格属性分配值。
cellForRowAtIndexPath
请参阅此 Apple 示例代码
网上也有很多例子,搜索自定义UITableViewCell,你会发现各种各样的教程。
这是另一个第三方教程链接:
希望这可以帮助。