ios - How to add tabbar controller as child view to parent view? -


- (void)viewdidload  {     [super viewdidload];      uitabbarcontroller *controller = [self.storyboard instantiateviewcontrollerwithidentifier:@"tabbar"];     [self addchildviewcontroller:controller];     controller.view.frame = cgrectmake(0,0, 500, 500);     [self.view addsubview:controller.view];     [controller didmovetoparentviewcontroller:self]; } 

how can add tabbar viewcontroller child view uiviewcontroller in objective-c?

as mentioned doing here [self.view addsubview:controller.view]

the autoresizing mask of view of tabbar controller assumes full size of superview.

if set frame when instantiating tabbar controller, sure change autoresizingmask property of tabbar's view doesn't have flexible width or flexible right margin.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -