Add top layout guide in NIB file (XIB)

<>

This question already has an answer here:

Answers


You can do this by by implementing new property called edgesForExtendedLayout in iOS7 SDK

-(void)viewDidLoad {
      if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
         self.edgesForExtendedLayout = UIRectEdgeNone;
}

or

If you are using navigation bar and xcode5 then..

In Interface Builder,select view controller, and then navigate to the attributes inspector. In "Extend Edges". check Under Top Bars

i have solved my problem from Here


I think you need to write this condition for that

 float SystemVersion=[[[UIDevice currentDevice] systemVersion] floatValue];
  if(SystemVersion<7.0f)
   {
     //Currently your app is running in IOS6 or older version. So you need not 
             to do anything.
   }
  else
   {
     // Currently your app is running in IOS7.
   } 

I am doing it programmatically. because you have to check both the frame sizes for ios 7 and others. because for status bar you have to manage 20 pixel in IOS 7 and other. so, just put View in XIB as you want in any IOS and for other you can manage by this...

CGSize result = [[UIScreen mainScreen] bounds].size;
        if(result.height == 480)
        {
   NSArray *vComp = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
            if ([[vComp objectAtIndex:0] intValue] >= 7) {
                NSLog(@"Ios7 resize the frame");

            }
            else
            {


            }

}

        if(result.height == 568)
        {
  NSArray *vComp = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
            if ([[vComp objectAtIndex:0] intValue] >= 7) {
                NSLog(@"Ios7 resize the frame");


            }
            else
            {


            }

Hope this helps....


Need Your Help

What are some resources for getting started in operating system development?

operating-system kernel osdev

One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done).

Dimensional Modeling - Queries without facts

data-warehouse dimensional-modeling

I'm creating a dimensional model about a "calls recording system", for a VoIP service.