iphone - Frame wrong when viewcontroller pushed using auto layout -


i'm working on ios app.

i have uiviewcontroller uses auto layout. if create view controller in app delegate , set window's root view controller, layout appears expected.

if, however, make navigation controller root view controller when app launches (the navigationcontroller's root view controller different view controller), either push other view or present modally, layout wrong.

to diagnose problem, put following statement in viewdidappear method:

nslog(@"x:%f y:%f w:%f h:%f", self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height); 

when main view root view controller (which produces desired result), output:

x:0.000000 y:20.000000 w:320.000000 h:460.000000

when main view presented modally, output:

x:76.000000 y:250.000000 w:168.000000 h:0.000000

is there reason view's frame different when presented modally opposed being root view controller?

thank assistance can offer!


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -