i create a TabController inside a TabController with SegmentControl but i got that strange margin that came on the first page but when i click on other everything is fine why ?
I posted my first page and my second page :
That how i implement my view when i click :
- (void)setSelectedIndex:(NSInteger) position
{
UIViewController* selectedController = [self.viewControllers objectAtIndex:position];
if (self.lastPositionOfPage == -1)
self.lastPositionOfPage = 0;
else
{
[selectedController willMoveToParentViewController:nil];
[selectedController.view removeFromSuperview];
[selectedController removeFromParentViewController];
}
[selectedController willMoveToParentViewController:self];
[self addChildViewController:selectedController];
[self.content addSubview:selectedController.view];
[selectedController didMoveToParentViewController:self];
self.lastPositionOfPage = position;
}