ios - Why is child view controller occupies the entire screen? -


i'm trying learn how make child view controller , face problem: child view controller made unknown reasuns occupies whole screen instead of view add it. here super-simple code:

cvcchildviewcontroller *childviewcontroller =     [[self storyboard] instantiateviewcontrollerwithidentifier:kvcidentifier]; [self addchildviewcontroller:childviewcontroller]; [self.childview addsubview:childviewcontroller.view]; [childviewcontroller didmovetoparentviewcontroller:self]; 

and here storyboard screen: enter image description here

white uiview (childview) subview of self.view. , wand child view controller not cross childview bounds. how this?

set childviewcontroller.view.bounds = self.childview.bounds before add subview. need set frame of childviewcontrollers view before adding subview , else take default height. hope helps. cheers


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -