I have a view controller in storyboard, and combining UILabel and ui collection view together in the controller. However every time I change the UILabel text, it will trigger auto layout, which shows I got view will layout and view did layout events. I don't want changing text to trigger auto layout. But When I use self.XCategoryLabel.translatesAutoresizingMaskIntoConstraints = NO;
It does not work.
How can I make UILabel text changing not trigger auto layout? I do use auto layout in this controller, but I DONT want the label to trigger it.
I add a view in Storyboard, and add constraint to it. Then I add the UILabel into this view by code, and NOT setting Label.translatesAutoresizingMaskIntoConstraints to NO.
Then It will not trigger viewDidLayout and viewWillLayout.
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