Vibhooti Vibhooti - 14 days ago 8
iOS Question

Add top layout guide in NIB file (XIB)

How can I add top layout guide in NIB file or how can I specify space from the top navigation bar and status bar so that it does not create problem between ios 6 and iOS 7?

Answer

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