ios - self.view.frame/bounds of UIViewController changed between viewDidLoad and viewWillAppear iOS8 -
i have strange problem view in iphone app.
i have 2 uiviewcontroller
subclasses a
, b
.
a uiviewcontroller
of class b
(let´s call b
) called method inside of uiviewcontroller
of a
(a
). when b
displayed, frame , bounds of "root" view of b
changed magically between calls of viewdidload
, viewwillappear
. have no idea, why happens. far know, other views not have problem.
these frames , bounds:
in viewdidload
:
self.view.frame: {0, 0}, {375, 667} self.view.bounds: {0, 0}, {375, 667}
in viewwillappear:
:
self.view.frame: {0, 64}, {375, 554} self.view.bounds: {0, 0}, {375, 554}
i made screenshot demonstrate problem. yellow area self.view
of b
. red , green ones subviews of self.view
. there layouting. don´t think have effects on self.view
frame or bounds.
does have idea causes problem?
okay, after hours (literally!) of debugging found error: forgot call self = [super init];
in custom init method. caused weird behaviour.
thanks helpful comments!
Comments
Post a Comment