Posts

Showing posts with the label childviewcontroller

Child View frame change when pushed again from parent view controller

Child View frame change when pushed again from parent view controller I have added a viewcontroller's view as a child view in an another viewcontroller. The child view controller has a tableview. Child view controller can be pushed more than once while click on didSelectRow to show updated data in same viewcontroller which is working fine. But when I push the child view controller from my parent view the child view changes its frame to original viewcontroller frame and leave the parent view. So I want to make sure that it will always stay in the frame of its parent view and push and pop will occured only inside parent view. didSelectRow Adding child view: UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Home" bundle:nil]; ChildViewController *vc = [sb instantiateViewControllerWithIdentifier:@"ChildViewController"]; [self addChildViewController:vc]; [vc.view setFrame:self.tableFilters.frame]; [self.viewContainer addSubview:vc.view]; [vc...