I have noticed a change in how iOS 9 loads/displays views compared to previous versions of iOS. Here's an output of self.view.frame
in iOS 8.4
viewDidLoad {{0, 0}, {320, 504}}
viewWillAppear {{0, 64}, {320, 504}}
viewDidAppear {{0, 64}, {320, 504}}
And here's the same for iOS 9
viewDidLoad {{0, 0}, {320, 504}}
viewWillAppear {{0, 0}, {320, 504}}
viewDidAppear {{0, 64}, {320, 504}}
Notice that in viewWillAppear
method iOS 9
fails to update the origin
of self.view.frame
.
This causes certain issues in my app such as views initially being position incorrectly.
Does anyone know if it's intended or it's a defect? And perhaps a quick fix?
UITabBar
(showing in some screens, hiding in others), which is not a subview ofself.view
. Besides,iOS 9
fails to update view size as well as origin. – HouselightsviewDidLoad {{0, 0}, {600, 536}}
,viewWillAppear {{0, 0}, {600, 536}}
,viewDidAppear {{0, 64}, {320, 504}}
foriOS 9
– Houselights[[UIScreen mainScreen] bounds]
instead of relying onself.view.frame
. This indeed helped me avoid the negative effects of this change iniOS 9
, so thanks. – Houselights