I have a UIStackView to which I add a UIButton and UITableView as subviews. Initially since the table view has no content it's height is zero.
When user takes an action the UItableView receives some data and reloads itself.
in numberOfRowsInSection I return the count but since the height of UITableView is zero call to cellForRowAt is not working.
I want to keep the height of UITableView zero when no content and give it height when the content is there.
And since UITableView is a subview of UIStackView it should expand too
How can I achieve it?