2

How can we change the colour of a modal view controller getting opened after selecting an activity (mail, message etc.) from the UIActivityViewController.

I have tried setting Status bar style to UIStatusBarStyleLightContent but it did not work. View controller-based status bar appearance is set to NO. My app has a number of UIViewControllers where I need the colour of the text of the status bar to be white while in some, I need it to be black and I need the colour of the status bar text to be white when activities are opened from the UIActivityViewController. How can this be achieved?

I have tried something from here in the following manner -

[self presentViewController:activityVC animated:YES completion:^{
            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}];

but it did not work.

Community
  • 1
  • 1
genaks
  • 757
  • 2
  • 10
  • 24

1 Answers1

0

As far as i know, except your method,we can use the method - (UIStatusBarStyle)preferredStatusBarStyle where the activityVC present, and return UIStatusBarStyleLightContent.Hope to help you.