ios - Child View Controller Resizing -


i have 2 child view controllers nib files display on parent view controller in storyboard using:

[self addchildviewcontroller:vc1]; [vc2 willmovetoparentviewcontroller:nil];  [self transitionfromviewcontroller:vc2     toviewcontroller:vc1     duration:1.0     options:uiviewanimationoptiontransitioncurlup     animations:^{}     completion:^(bool finished) {         [vc2 removefromparentviewcontroller];         [vc1 didmovetoparentviewcontroller:self];     }]; 

i set child controllers view's size free form. want them size correctly when using both iphone4 , iphone5. correctly mean want child controller's view , subviews shrink on iphone4 fit whole view onto screen , expand fit screen on iphone5. right have child controller views set iphone5. use ib's autoresizing make subviews size correctly on both phones, not working child view controllers.

i tried setting programmatically in parent controller's viewdidload:

self.vc1.view.autoresizingmask = uiviewautoresizingflexibleheight | uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin; 

when did work tried setting in child controller's viewdidload:

self.view.autoresizingmask = uiviewautoresizingflexibleheight | uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin; 

which didn't work. so, how make child view controller's resize correctly in both iphone4 , iphone5?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -