ios - 计算 View 数量并将其动态添加到 tableView 行 swift 3?

标签 ios swift autolayout tableview

我需要在屏幕下方进行设计。

我已经采取了动态桌面 View 。在表格 View 中我采取了两个 View

---> one view contains a label - used to display month name
---> second View contains two labels which is in the above screen 
i got problem with the second view. i have taken two labels in second view

second View-->
--> belowLabel: displaying the date of the Jan (ex: 5 )
--> aboveLabel: the no of visits on 5th jan
if January contains 6 days visits, then i need to display that no of secondviews(dynamically)

我按照月份显示行数。但如何在 TableView 行内动态显示 View ?

最佳答案

您可以使用 UICollection View 来通过个性化的 uicollectionViewCell 来实现此目的

关于ios - 计算 View 数量并将其动态添加到 tableView 行 swift 3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45014253/

相关文章:

ios - View Controller 不显示任何内容

ios - 如何在特定时间播放音频时调用 Action ?

ios - MapBox 在 CGRect 中获取 visibleCoordinateBounds

swift - 如何使用 SWRevealViewController 从 Swift 中的 UITabBarItem 打开侧边菜单

iphone - UIWebView/ subview 约束问题

ios - Swift CGPoint x 和 y 覆盖编程约束

ios - 自动布局和 "Hide bottom bar when pushed"

c++ - 在 Xcode 调试器中自动显示 C++ 对象的属性

ios - 应用程序的 Info.plist 必须包含 NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseUsageDescription。

iOS - UITableView 单元格中的某些点不可选择