Frame calculations in `viewDidLayoutSubviews`
问题 First, I should mention, this is mostly an efficiency issue. There are many discussions as to where to do frame calculations where viewWillAppear is too early and viewDidAppear is too late (view is already visible). The common answer is to do frame calculations in viewDidLayoutSubviews . Problem is, it gets called multiple times. Worse, the most accurate call, the one where all frames have their final size is the last one. To my knowledge there is no way to know which call is that final one.