I have custom subclass of a UITableViewCell with some constraints set.
Problem is when I try to change size of one view like this:
CGRect frm = CGRectMake(0, 0, someValue, 30);
cell.indentView.frame = frm;
other views, which depend on cell.indentView width, are not moving at all.
What can be the case?
This code will work:
// enumerate over all constraints
for (NSLayoutConstraint *constraint in cell.indentView.constraints) {
// find constraint on this view and with 'width' attribute
if (constraint.firstItem == cell.indentView && constraint.firstAttribute == NSLayoutAttributeWidth)
{
// increase width of constraint
constraint.constant = someValue;
break;
}
}