2

I am seeing viewWillLayoutSubviews called repeatedly every time I update title text of UIButton, which is in a subview. I am not sure why, because there is no bounds change or change in view position. Is viewWillLayoutSubviews really called when subview of a subview gets refreshed?

    button?.setTitle(text, for: UIControl.State.normal)
    button?.setTitle(text, for: UIControl.State.selected) 
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131

0 Answers0