I am facing some problems related to autolayout, there are two custom views inside my Custom table cell, The both custom views which I am adding programmatically inside the UITableViewCell has to update the cell height dynamically.
The first view has a dynamic cell and its height is increasing with the custom View and having an effect on the cell height as well but the second view height have no effect on the cell height.
Constraints for my UILabel inside first custom View
[
Second customView
[
This is my second view and the yellow view has the dynamic height based on the view size
This is my custom Cell and have two views the top is first custom view and the second is second custom view which ill add from nib
Constriants of my first customView inside the cell
Constraints of my second customView inside cell
The final result which is cutting the second view
if ill gives the margin to my second view it will show the second view fine but cut the top view text.
self.commentViewRef.bottomAnchor.constraint(equalTo: margins.bottomAnchor, constant: 0).isActive = true
Margin to second view cuts the first view text
check below screenshot