Question

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 :

page 1 page 1 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;


}
Was it helpful?

Solution

Thanks again to @Larme. For people get same problem. Select your UIViewController in the StoryBoard then unchecked in Exented Edges all checkbox

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top