-1
enter image description here 私は細胞のX数とのtableViewを持って、すべての細胞は、細胞のN数を持つ1つのテーブルビューを持っています。すべてのX細胞を作る方法 はそれのコンテンツサイズがサブのtableViewだ収まります。iOSのセルフサイジングテーブルビュー
enter image description here 私は細胞のX数とのtableViewを持って、すべての細胞は、細胞のN数を持つ1つのテーブルビューを持っています。すべてのX細胞を作る方法 はそれのコンテンツサイズがサブのtableViewだ収まります。iOSのセルフサイジングテーブルビュー
私は細胞のあなたのXの数は、この場合のセクションの数になり、セルのN数は、そのセクション内の行数となりますので、あなたは、セクションとテーブルビューを使うべきだと思います。
//MARK: TableView Delegate
func numberOfSections(in tableView: UITableView) -> Int {
return X
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "YourIdentifier") as? YourTableViewCell
return cell
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return numberOfRows
}
希望が必要です。
問題は、私は、Xセルに関連するサブテーブルビュー内の異なるセクションに関連する異なるセルを表示する必要があります。 これは私が作りたいデザインです。 https://i.stack.imgur.com/quy1H.png –