I do everything programmatically when developing for ios, so I manually initialize the view controller view in loadView for all my view controllers (this is what Apple says). What upsets me is the viewcontrollers frame, initially this {{0, 20}, {320, 460}} incorrectly takes into account any navbars or tabs that I have in my application. The view finally sets its proper frame in viewDidAppear, but by then it's too late to do anything. In any case, in order to recognize the layout of a view earlier, without calculating it manually?
This is disappointing, because I always have to manually check whether the phone is in landscape or portrait mode to account for rotation, and if I need to configure my routines in a certain way, which I can not do with autoresistance, then I also have to perform manual calculations.
Is there any template that Apple recommends for this, or is it the same if it recognizes the layout of the view before, without manually calculating it?
source share