title: How to change StatusBar style in Objective-C (iOS 8)?
body: <p>I want to change StatusBarStyle, am using preferredStatusBarStyle method and also added "View controller-based status bar appearance" is YES in plist, but i don't know, why is not working?
  I have mentioned following steps as below:</p>
  
  <p><strong>Step:1</strong> </p>
  
  <pre><code>// preferredStatusBarStyle Method
  
      -(UIStatusBarStyle)preferredStatusBarStyle
      {
          CGRect screenRect = [[UIScreen mainScreen] bounds];
          CGFloat SW = screenRect.size.width;
          [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  
          UIView *statusView=[[UIView alloc]initWithFrame:CGRectMake(0, 0,SW,20)];
          statusView.backgroundColor=[UIColor blackColor];
          [self.view addSubview:statusView];
          return UIStatusBarStyleLightContent;
      }
  </code></pre>
  
  <p><strong>Step:2</strong></p>
  
  <p>//Add plist</p>
  
  <p>View controller-based status bar appearance="YES"</p>
  
  <p><strong>Step:3</strong></p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
      // Do any additional setup after loading the view.
      [self preferredStatusBarStyle];
   }
  </code></pre>
  
  <p>Please suggest me.</p>