When my main view rotates, I want to re-arrange the sub-views, so in my ViewController I redefine
willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration
and set the framework to a subspecies. This is all good and good, but in subViews I also redefined
layoutSubviews
so that they appear correctly. But the problem is that now it is called twice - presumably once when I set Frame to willAnimateRotationToInterfaceOrientation and once because of rotation. (If I do not install Frame, it will be called once.)
Undoubtedly, the responsibility of the ViewController is to compose frames so that it looks like a design flaw - what is the solution, so that layoutSubviews is called only once?
source share