0

I am a beginner with iOS development. Currently I have migrating a ios5 code to the ios7.

Getting the following overlap issue in my code : http://s17.postimg.org/90m7mx5lb/collide.png

I have updated the app delegate with the following code :

self.window.frame =  CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);

The interface etc, is generated directly via ViewController code and not using Interface Builder or StoryBuilder.

Please advice..

UPDATE:

Using the following in all viewcontroller

UIImage *stretchImage=[UIImage imageNamed:kNavigationBg]; stretchImage=[stretchImage stretchableImageWithLeftCapWidth:1 topCapHeight:0]; [self.navigationController.navigationBar setBackgroundImage:stretchImage forBarMetrics:UIBarMetricsDefault];

nashj
  • 1
  • 2

3 Answers3

0

Select each ViewController in your Storyboard and, tick both options "Under top bars" , "Under bottm bars"

enter image description here

Programmatically ,

self.edgesForExtendedLayout = UIRectEdgeNone;
Rukshan
  • 7,902
  • 6
  • 43
  • 61
0

Set View controller-based status bar appearance to NO in ur plist.

Joker
  • 734
  • 3
  • 11
  • 27
  • I have a VideoPlayer, when I set view controller-based status bar to NO, and return to the app. The sizing becomes perfect. please advice. – nashj Apr 18 '14 at 09:49
  • after returning from mediaplayer the height of navbar updates as desired – nashj Apr 18 '14 at 12:55
  • added the view controller code in the main question.. will this help?? – nashj Apr 18 '14 at 14:27
0

You should add

if(IS_IOS7)
{
    self.edgesForExtendedLayout=UIRectEdgeNone;
}
NKB
  • 651
  • 5
  • 13
  • Try UIRectEdgeBottom and also if your navigation bar is opaque try [self setExtendedLayoutIncludesOpaqueBars:YES] – NKB Apr 18 '14 at 09:58
  • In appdelegate try add [[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque]; with the above code unchanged – NKB Apr 18 '14 at 11:39
  • added the view controller code in the main question.. will this help?? – nashj Apr 18 '14 at 14:27