I am having a problem with AutoLayout and layoutSubviews
I am using iOS9 SDK Beta
One of my dynamic content label has colored background so I need to add custom width for spacing.
Screenshot 1 (Looks Ok On View First Load)
Screenshot 2 (Problem occurs when you start scrolling. Custom width is not working sometimes.)
This is the code block I used in my custom UITableViewCell
- (void)layoutSubviews;
{
[super layoutSubviews];
[lblTransactionType sizeToFit];
CGRect rect = lblTransactionType.frame;
[lblTransactionType setFrame:CGRectMake(rect.origin.x-5, rect.origin.y, rect.size.width+10, 18)];
}
I guess I should use dynamic constraints, but how?
Any kind of help highly appreciated.
Thanks.