I have a UITableViewController in my SwiftUI project. The number of cells in the UITableView can be different.
1 cellHeight is 60. If I don't set a .frame(height ) on the Section it will barely show one full cell. But since I don't know how many rows there will be I can't set the .frame(height). And setting minHeight/maxHeight will always use the maxHeight...
Is there someway to count the height according to the number of cells or can I make the TableView() frame dynamic in some other way?
var body: some View {
NavigationView {
Form {
Section(header: Text("My UIKit Table View")) { TableView() }
Section(header: Text("My SwiftUI View")) { ContentView() }
}
}
}