Cannot set "UIBarPositionTopAttached" to navigationBar

I did one UIViewControllerthat has navigationControlleras a parent (connected in the storyboard), and I want to apply the navigationBar image to the statusBar background.

but it seems that the statusBar cannot be like Transparent,

I tried to install

- (void)viewWillAppear:(BOOL)animated {    
 [self.navigationController.navigationBar setBackgroundImage:[UIImage
 imageNamed:@"barTop.png"] forBarPosition:UIBarPositionTopAttached 
 barMetrics:UIBarMetricsDefault];

 [self setNeedsStatusBarAppearanceUpdate];
 ....

}
- (UIStatusBarStyle)preferredStatusBarStyle {
  return UIStatusBarStyleLightContent;
}

c UIViewController.

But the navigation backgrounds and status bars are highlighted.

enter image description here

I am trying to make a plist file as "View status bar based on controller" YES and NO. but still i cant configure statusBar from viewController. I could not find the same problem on this bulletin board.

Does anyone know a solution or how to debug?

Thank you for reading.

(9/3 added: I want to make backgrounds together for navigationBar and statusBar.

navigationController ViewController, ( ).

- , tabBarController, .)

+4
2

, , .

viewController, . , statusBar self.window.backgroundColor. navigationController , viewController (20, 0). . , - contentInsets. .subviews [0] .

,  • uiViewControllers, UInavigationController  • edgeForExtendedLayout  • - UIScrollView ( )

, navigationController storyBoard, , (0,0) AdjustsScrollViewInsets = viewController.

, , viewControllers (0,0), navigationBars statusBars.

. iOS 7 iOS 6 iPhone

0

All Articles