I change view controller from one to other. The phone was in Landscape orientation when first controller was active. Second controller supports only portrait orientation. When it becomes active it for a moment has landscape orientation, so it's content is drawn for landscape orientation also. Then view controller rotates to portrait orientation, but the redrawing of the content doesn't happens.
In viewWillTransition I call view.setNeedsDisplay() but that doesn't help too.
To solve the problem I made initUI function which is called in viewDidLoad only if main window is in portrait orientation. In other case I call initUI in  viewWillTransition.
I want to know what code should I write in such standard situation.
 
    