0

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;


}
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Armanoide
  • 1,248
  • 15
  • 31
  • Do you have a `UITableView`? – Larme Mar 11 '14 at 14:56
  • Yes i have, just above the button blue button.I set his height to 0 when is empty. – Armanoide Mar 11 '14 at 15:08
  • 1
    Is it grouped? If yes, that normal. The iOS7 with grouped cell, "center vertically it) in iOS7. Check this: http://stackoverflow.com/questions/20799414/why-do-i-have-an-excessive-amount-of-space-in-a-uitableview-section-header – Larme Mar 11 '14 at 15:11

1 Answers1

0

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

Armanoide
  • 1,248
  • 15
  • 31