Frage

In my application statusbar color is black while the statusbar text color is white, to achieve this i have set 'View controller-based status bar appearance' to 'NO' in Info.plist file and have set this following line of code in AppDelegate class to make the statusbar text color light:

 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent] ;

In ios7 i am trying to open a MFMailComposeViewController, its working properly but the problem is that while presenting a MFMailComposeViewController the color of text items in statusbar is changed to the black automatically and right after the moment i dismiss a MFMailComposeViewController statusbar text color is getting white automatically, don't know why is this happening..

If any one knows solution please help..

War es hilfreich?

Lösung

Implement this method in your viewController,

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

and call this method where you want,

[self preferredStatusBarStyle];
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top