0

I cannot find the reason for this strange gap in my layout.

enter image description here

and

enter image description here

It happens on NONE of my other screens, only this one, which leads me to believe it some sort of Rect size issue, but I've not set it anywhere? So why suddenly start happening?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Broak
  • 4,161
  • 4
  • 31
  • 54

3 Answers3

0

Select the male/female control in the Interface Builder and select the Size Inspector (The ruler in the right side panel), in the Autosizing box make sure only the top and top left sticks are selected.

ProfessorT
  • 187
  • 2
  • 13
  • Nope, nothing, everything is sized correctly from what i can tell, i'm simply airing on the side of giving up on iOS at this point :( – Broak Mar 20 '14 at 01:30
  • It also seems to span from the navigation bar itself. deleting all the controls still leaves the gap? – Broak Mar 20 '14 at 01:48
  • Do you have auto layouts on? You could have accidentally put a rule that does that. If you can share the project I'm sure we can help you. – ProfessorT Mar 20 '14 at 01:56
  • No i do not! I shall give it one more go then get back to you, thanks! – Broak Mar 20 '14 at 02:01
  • @ProffesorT OK, It's definatley something to do with the nav bar, moving the segment control up forcefully, somewhat out of the window to make the appearing of it working results in the top half of the button being inclickable, as if there is a transparent view ontop of it getting in the way? – Broak Mar 20 '14 at 02:17
0

please try this in your viewdidload method.

 self.automaticallyAdjustsScrollViewInsets = NO;
Hitendra
  • 1,610
  • 1
  • 15
  • 22
-1

What specifically did you try? Programmatically, putting this (which I took from the link I provided) in viewDidLoad should work. You will have to switch viewController with your view controller.

float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];
if (systemVersion >= 7.0) {
    viewController.edgesForExtendedLayout = UIRectEdgeNone;
}

The other way is to programmatically set the view frame position.

jd.
  • 84
  • 6
  • That did not work either, in terms of what i've tried, i like you said, set the view position, adding twenty to the y position fixes the top margin but the content is pushed off the bottom, i've tried deleting all content and trying again, ensuring all the 'Adjust scrollview insets' are disabled etc. – Broak Mar 20 '14 at 01:08
  • OK, It's definatley something to do with the nav bar, moving the segment control up forcefully, somewhat out of the window to make the appearing of it working results in the top half of the button being inclickable, as if there is a transparent view ontop of it getting in the way? – Broak Mar 20 '14 at 02:18