0

enter image description here

Why there is this white space at bottom-left? it wasn't here on ios6 compiled version and i can't understand how to remove it. My nib file hasn't it (the top level view is large as you see (20 pixel left from the image) and controller side there isn't any trace of view's dimensions.

EDIT: i've already tried to put C_X solution on code:

[super viewDidLoad];


self.view.backgroundColor = [NVGlobals homeCellBackgroundColor];
// on the iPad, disable panning (because we're inside a stacked
// view controller
if (IS_IPAD) {
    self.edgesForExtendedLayout=UIRectEdgeNone;
    self.panEnabled = YES;

}

but it doesn't work. Any ideas?

EDIT: PROBLEM SOLVED: I'm using a plugin called PSStackedView (https://github.com/steipete/PSStackedView/) and to use it correctly on iOS7 you must change viewRect with bounds instead of application:

- (CGRect)viewRect {
// self.view.frame not used, it's wrong in viewWillAppear
CGRect viewRect = [[UIScreen mainScreen] bounds];
return viewRect;

}

Alessio Crestani
  • 1,602
  • 4
  • 17
  • 38
  • It is issue of status bar in iOS 7 so you need to manage it in iOS 7.. There are many ways but you can also give top of Main view *(`self.view`)* **20** pixel. – iPatel Jan 27 '14 at 10:04
  • At your navCon of rootViewCon.. self.navigationController.view.frame = CGRectMake(0, 20, 320, 548); – iPatel Jan 27 '14 at 14:34

1 Answers1

0

This is because in iOS we have extended edges, you can set it to UIRectEdgeNone.

self.edgesForExtendedLayout=UIRectEdgeNone;

Then your view will not move up under the status bar.

Adnan Aftab
  • 14,377
  • 4
  • 45
  • 54
  • @Alessio Crestani: This is available in ios7 and later. If your app supports ios check you should check the IOS version and use. – jailani Jan 27 '14 at 10:08
  • Have i to write it on the viewDidLoad of the top layer? because it didn't work. – Alessio Crestani Jan 27 '14 at 10:08
  • @C_X i'm transitioning my app to ios7 – Alessio Crestani Jan 27 '14 at 10:08
  • If you are supproting both iOS6 and iOS 7 you can use deltas... Now If you are supporting only iOS 7 it will be fine to set this property in ViewDidLoadMethod after call to super – Adnan Aftab Jan 27 '14 at 10:13
  • it doesn't work. I put it after super.viewDidLoad of the topView. And if you watch the screenshoot, you can see that the imageview is set without 20px from bottom. – Alessio Crestani Jan 27 '14 at 10:22
  • Never use this syntax `super.viewDidLoad` for method, its acceptable for properties only... this is not the way you calling method in Objective-c, `[super viewDidLoad]`; – Adnan Aftab Jan 27 '14 at 10:28