I made app in iOS6. As I run on iOS7, it shows are
I tried this code, but no use.
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
nav.navigationBar.translucent = NO;
What should I do. My xib is like this
I made app in iOS6. As I run on iOS7, it shows are
I tried this code, but no use.
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
nav.navigationBar.translucent = NO;
What should I do. My xib is like this
add these lines of code in your viewDidLoad
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
}
else
{
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
and define this method
- (BOOL)prefersStatusBarHidden
{
return YES;
}
This working for me.. Best of luck .. :-)
Add this two line in your viewDidLoad
method
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout=UIRectEdgeNone;
if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)])
self.automaticallyAdjustsScrollViewInsets=NO;
Hope this will help you.