I have a custom cell & I am trying to update constraints of subview as below:
CustomeCell.m
-(void)layoutSubviews
{
[super layoutSubviews];
_con_view_width.constant = _lbl_property.frame.size.width;
if(!_btn_imageCount.isHidden)
_con_view_width.constant = _lbl_property.frame.size.width + _btn_imageCount.frame.size.width;
NSLog(@"%@",NSStringFromCGRect(_view_lbl_btn.frame));
[_view_lbl_btn updateConstraintsIfNeeded];
NSLog(@"%@",NSStringFromCGRect(_view_lbl_btn.frame));
}
Problem The constraint are working only after reload rows when scrolling
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With