Reputation: 95
I have two UITableView
. I have set first UITableView
height = 600
and second UITableView
height = 400
. Second UITableView is below first UITableView
. Both UITableView
data comes from the database. The problem is, if data in the first UITableView
is less than its height, then it shows blank space between first and second UITableView
. I want both UITableView
to have height according to its data and also want to remove that blank space.
Upvotes: 0
Views: 105
Reputation: 1296
That's because you haven't set the constraints up correctly and the UITableView is only doing what you asked it to do - set the height at 600.
To achieve the results you are looking for, you need to click the top UITableView and then click the size inspector button on the top right hand side (the little ruler) and change the "Height Equals" property constant.
If you change the constant to < 600
then it will be no greater than 600. If you change it to > 600
then it will only ever be no less than 600.
Upvotes: 1