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

python - Mongodb How to add addtional information when aggregating? -

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

ruby - Net::HTTP extremely slow responses for HTTPS requests -