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..

有帮助吗?

解决方案

Implement this method in your viewController,

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

and call this method where you want,

[self preferredStatusBarStyle];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top