xcode - iOS - Autolayout not working for main UIView - (screenshots inside) -


i seem having problems getting main uiview in view controller stay same size when going portrait mode. screenshots pretty tell whole story. ipad , ios 6.1, xcode 4.6.

landscape

portrait

and here screenshot of constraints within xcode

it looks textviews , button within view stays in same position , size uiview (which subview view controllers view) not want keep same width , height.

i load view programmatically via delegate couple of reasons thats fyi - trying give info possible.

//set starting root view controller login screen     uistoryboard *storyboard = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil];     demoviewcontroller *loginvc = (demoviewcontroller *)[storyboard instantiateviewcontrollerwithidentifier:@"loginvc"];     self.window.rootviewcontroller = loginvc;     [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(changerootvcsplit:) name:@"changerootvcsplitnotification" object:nil]; 

i learning there know autolayout , wondering if this? let me know if need anymore info. help.

you should give view fixed width constraint , fixed height constraint (from menu, editor --> pin --> width , likewise height), delete horizontal , vertical space constraints (leaving centerx , centery constraints).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -